QUERY · ISSUE
windows: os.sep should be backslash
enhancement
This came up in https://github.com/micropython/micropython-lib/pull/527, and we have a workaround there, but getting this right will be required to make os.path work correctly.
The windows port current returns / from os.sep but should be \. We should fix that, as well as implementing os.altsep for unix/windows (return None on unix, / on windows).
CANDIDATE · PULL REQUEST
tools/mpremote: Fix "fs cp -r" on Windows.
tools
Currently when using mpremote fs cp -r _manifest : on windows, it does not correctly handle the \ path separator, resulting in things like
cp _manifest\config_def.mpy :_manifest/_manifest\art.mpy
which gets even worse on-device:
os.listdir("/_manifest")
['_manifest\x07rt.mpy', ...]
Changing to a simply '/',join() appears to fix this problem cleanly.