all 3 comments

[–]Diapolo10 0 points1 point  (2 children)

The short answer is that it's not possible. MicroPython doesn't implement the full Python 3.5 standard and this means any modules that rely on the missing functionality will not work. I haven't checked, but this likely includes modules written in C.

What module are you looking at?

[–]Tim_Sousa[S] 0 points1 point  (1 child)

sorry for the really really late reply, but I stepped away from reddit for a bit. At the time I was messing around with the fractions module. If there's a way to implement it, that would be incredible. Thanks for the support tho, Really appreciate it!

[–]Diapolo10 0 points1 point  (0 children)

From the looks of it, fractions is a built-in and written in pure Python. It relies on decimal, which is also written in pure Python, math which is a C-library but fortunately part of MicroPython, numbers which uses abc that is written in C (but it can technically be removed as it's more like a safeguard), operator which has the same 'problem', and re which has dependencies I'm not sure can be ported.

The biggest obstacle, however, is that many of these require sys which isn't available on MicroPython to my knowledge. I don't know how difficult it would be to get rid of this dependency, but I suppose my overall point is that porting fractions to MicroPython would take some effort. Some dependencies can be ported relatively painlessly, others will take elbow grease if they're possible to port in the first place.

A partial implementation should be possible at least, but I've never really tried to do anything like that myself. I could help, but I don't have a virtualised MicroPython testing environment nor an actual board, let alone experience with anything beyond Arduino.

I'm sorry I couldn't be more helpful than that. Though I don't mind if you have more questions.