scientifichackers / ampy

MicroPython Tool - Utility to interact with a MicroPython board over a serial connection.
MIT License
707 stars 155 forks source link

directory handling somewhat confusing #12

Closed mjmare closed 6 years ago

mjmare commented 7 years ago

I can 'put' files to the board without specifying the directory: ampy put test.py will put the file in /flash. amp mkdir testdir will create a dir /flash/testdir

I would therefore expect ampy ls to show the files in /flash as well. It doesn't, it will show the files in /. When putting files in subdirs one has to include the full path including /flash, like ampy put test.py /flash/testdir/test.py instead of ampy put test.py /testdir/test.py

Finally, my understanding is that installing modules from micropython-lib one has to copy all files to the board. It would be nice to have ampy respect wildcards.

As it is, ampy is already very useful! Thanks.

I'm using a LoPy board.

tdicola commented 6 years ago

I'll close this as the issue is really with micropython and the filesystem on some boards. The ls command does an os.listdir() and on some boards it defaults to /flash and on others it defaults to /. Rather than put hacks or odd behavior in ampy this is better to push upstream for consistency in micropython.

Check out the recursive folder put option that's available now too, that can push multiple files at once. Thanks!