mpremote: Add facility to specify location of config.py
I am adapting this project to add extra custom scripts. I wish to have config.py located on my server. The obvious way, a symlink in ~/.config/mpremote/ allows config.py to run Alas it runs in the directory of the symlink rather than in the directory containing the file. Consequently it doesn't pick up my scripts.
I currently export the envar XDG_CONFIG_HOME which works but is a hack. One option might be a MP-specific alternative envar, alternatively ensure that symlinks are followed.
tools/mpremote Copy folder content creates folder on board
Hi,
i noticed a behaviour with mpremote that doesn't seem right. I try to copy the content of a complete folder to the board. But instead of putting the folder content in the root of the device it creates a folder on the device and copies everything there.
Example:
Assume if have to following folder setup:
~/test$ tree mpy-project/
mpy-project/
├── boot.py
├── lib
│ └── urequests.py
└── main.py
I want to put the content of mpy-project on my empty board.
My first attempt was using this command:
mpremote connect /dev/ttyUSB1 cp -r mpy-project/* :
It transferred all files to the board but it was all in a folder called "mpy-project". It looked like that:
~/test$ mpytool -vp /dev/ttyUSB0 tree
./
└─ mpy-project/
├─ lib/
│ └─ urequests.py
├─ boot.py
└─ main.py
That seems counterintuitive for me since the *should be expanded and then the files should be copied.
There is also no use case where that behavior would make sense. If I wanted the complete folder copied I would leave /*out.
Or do i miss something?
Information about the version of MicroPython you're running
- Micropython 1.19.1
- mpremote 0.3.0
- ESP32