- Problem:
plistlib
can't read/write binary plists (<3.4)
- Solution:
pip install biplist
It's a drop-in replacement of py2's plistlib, and it handles XML plists too by calling through to plistlib.
- Problem:
os.makedirs
doesn't have exist_ok
(<3.2)
- Solution: catch the error and ignore it if it's EEXIST. StackOverflow answer
Why not use pathlib2
, like the top answer suggests? Because it's not a perfect port and can't handle non-ASCII paths, thanks to the difference in Unicode/string handling between py2 and py3.
- Problem: no
enum
(<3.4)
- Solution:
pip install enum34
- Problem: no
os.walk
(<2.3)
- Solution: use
os.path.walk
This is useful for PyS60 1.4.5 because that uses Python 2.2. Note that the code needs to be adapted, as os.path.walk
uses a callback function.