micropython IDE for linux on PC

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: micropython IDE for linux on PC

Post by SpotlightKid » Tue Jan 24, 2017 8:43 am

The ftplib in the CPython standard libarary just uses the sys and socket modules, at least for the non-SSL class. It should be easy to port to MicroPython. Make sure to use the socket library wrapper from micropython-lib, it provides the socket.create_connection function, which ftplib uses. You have to make a few other small changes to account for differences between the CPython and MicroPython socket implementations, but from a quick look at the source of ftplib.py, I see no major hurdles.

SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: micropython IDE for linux on PC

Post by SpotlightKid » Tue Jan 24, 2017 10:01 pm

SpotlightKid wrote:The ftplib in the CPython standard libarary just uses the sys and socket modules, at least for the non-SSL class. It should be easy to port to MicroPython.
This somehow piqued my interest and I had some free time on my hand, so I ported the ftplib module from the standard library to MicroPython. More information in this post.

Post Reply