How can I setup an emulation environment on my PC?


  • Pybytes Beta

    Is there a definitive procedure written somewhere to get an emulator environment setup on my PC that will pretty closely match a WiPy? I compiled MicroPython per the instructions for Mint but couldn't get uos.listdir() to work. (Sorry I closed my session or I'd share the error message.) And it's likely other things will fail.



  • @betterauto I guess the answer is NO. The Linux versions are different. You can use them for the basic language and standard file operations, but as soon as you need specific modules, they behave different. The HW specific modules are not supported at all. And if that's not enough trouble, you have the subtle differences between the micropython.org branch and the pycom.io branch.

    In the example you mentioned, the Linux uos module implements just a few methods. More can be found in the os module, once you install the micropython/micropython-lib. That tries to add many of the Python standard modules, but is sometimes a little bit sparse.


Log in to reply
 

Pycom on Twitter