File System on XRP with MicroPython?

Is there some documentation that explains how to manage files on the XRP via the MicroPython IDE we’re using?

I have at least 6 students sharing one XRP and files are proliferating rapidly.
Apparently the XRP file system does not show up as a USB drive on Windows 10/11. So I think the only way to organize files is via the IDE interface.
But the interface doesn’t seem to support moving files. You can only SaveAs. This is painfully tedious.

And I haven’t quite figured out how imports work yet. If I were to make one folder per student at the root level and move all their files into their folder, will I have any issues with imports not working? How does micropython figure out where to look for imports?

What are my limits on the number of files that can be stored on a single XRP? Are there any suggestions for how to manage the files when/if we exceed that?

As you can guess, the micropython world is very new to me. Is there documentation explaining all this?

Right now the programs are simple - i.e. An entire program is contained within a single file but at some point I need to understand how you can create a multi-file program. How do you do that?

Very cool that you have so many students using the same XRP. We are working on a future release of XRPCode that will help simplify this workflow. For now, there is a right click context menu that is available on the filesystem. If you right click on a file name you will have a few options. The two that you will want to look at are New Folder and Rename. You can create a new folder with each student’s name. Then with the rename you can move a file to that new folder. For example if you create a folder named Sarah then you can rename one of Sarah’s files. If the file name was myfile1.py then you can rename it to /Sarah/myfile1.py and it will move it to the Sarah’s folder. Also when the Save dialog comes up on the first save, you can also select a directory at that time. (There is also a right click context menu for that dialog to create sub folders at that time.)

As for the amount of storage. That is indicated at the top of the filesystem window. You will see something like ‘Storage: 0.33/0.9 MB’

That means you have used 0.33MB out of 0.9 MB available. and the green bar gives a visual indicator of how full memory is. The Pico W has 2MB of storage, but that includes Micropython, leaving around 0.9MB free.

The libraries will be found even when a program is in a subdirectory. If you go to the shell window you can type the following to find where MicroPython will look for the libraries.

import sys
sys.path

You can find more documentation about the path and extending libraries here

[MicroPython libraries — MicroPython latest documentation]

There are a number of good articles on the net about splitting MicroPython files into multiple files. Basically the main program file will import the secondary file.

Thank you! That helps. And it’s also nice to know there may be improvements in the future.