Where is my script?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Posts: 3
Joined: Wed Apr 18, 2018 8:56 am

Where is my script?

Post by ulros » Mon Apr 23, 2018 6:06 am

Hi All,

I wrote a small script on a m5stack which has micro:python flashed and is connected to my win10 64 box via putty.
The way I created it was using write.file like:

file = open("test.py","w")

This went well without producing any error.

When I want to read the file I simply don't find it.
I used

>>> import os,sys
>>> sys.path
['', '/flash/lib']
>>> os.listdir('/')
>>> os.listdir('/flash')

Now the question is: Where is my test.py script? :?:

Don't forget, I'm a python + micro python + ESP noob ;-)


Posts: 3
Joined: Wed Apr 18, 2018 8:56 am

Re: Where is my script?

Post by ulros » Wed Apr 25, 2018 2:55 am


In fact it seems that the first time I've entered the code it has not been written to a file.
This is why I couldn't find it.

I have no idea why but this was the reason.

Actually I connected the m5stack via USB -> COM and use Microsoft Code to write micro python scripts. I then save them and run them. When I want to upload a project I am receiving an error. Any idea anyone what this could be?

Additionally the output on the m5stack is:


Why do I have the 2 special characters? Could it be that the Baud rate of the Win10 64 USB -> COM driver is scrambling this?

Anyway - it's fun to dive into this :-)


Post Reply