Karthikeyan Singaravelan <[email protected]> added the comment:
You can use os.path.expanduser to expand tilde. Other os functions don't do it
implicitly.
>>> import os
>>> os.path.exists("~/stuff")
False
>>> os.path.exists(os.path.expanduser("~/stuff"))
True
----------
nosy: +xtreak
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40271>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com