windows: os.sep should be backslash
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).
implement os.sep
Checks
-
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
-
I've searched for existing issues regarding this feature, and didn't find any.
Description
To facilitate the reuse of libraries written for Python and to test Micropython libraries on regular Python,
I ask to implement in the module os the attribute sep
I am not sure about all ports and filesystems... but perhaps it can be just implemented as
sep = '/'
for all.
Code Size
No response
Implementation
- I intend to implement this feature and would submit a Pull Request if desirable.
- I hope the MicroPython maintainers or community will implement this feature.
- I would like to Sponsor development of this feature.