first a little background: i wrote a (dummy almost) module in my laptop, and then copied to /lib directory in my pyboard's flash card. When i connected to pyboard's REPL i could import the module but it did not work. After a while i detected a missing colon and after that all went well.
The reason of this post is to ask you of how is yoor work flow when developing scripts or modules for your boards..
At first i tried testing my module with the unix port in my machine but it didnt work because i needed "pyb" library and it is not installed in that port. Tried to install it with
Code: Select all
>micropython -m upip install pyb
Second try: i placed "prints" along the file expecting that during the import those "prints" would indicate where it failed.. did not work.
Third try: placing objects along the module.. expected that after importing the module i could make dir(myModule) and see which objects where created.. did not work either (only __file__ and __name__ showing). Seems that if there is an error the module name can be imported but the whole thing is ignored.
So what i ended up doing was edit directly the file in the sd card and comment this; comment that; until i found the error.
So i made it work but i wonder -and ask you guys- if there a smoother way of working this out. How do you do it?