This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ibshields
Recipients georg.brandl, ibshields, r.david.murray
Date 2013-01-06.19:59:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357502364.51.0.401493883499.issue16877@psf.upfronthosting.co.za>
In-reply-to
Content
David, Tilde expansion is different to globbing. Globbing in Python doesn't automatically do tilde expansion either.
>>> glob.glob("~")
[]

Looking at the documentation, I don't think it would be practical to add documentation to each affected function - there are too many. Apart from abspath and realpath (which started this conversation), there are join, isdir, isfile, isabs, and many others in os.path. posixpath and the other path handling modules.

Maybe a note at the top of the module documentation (e.g. http://docs.python.org/3/library/os.path.html) which has two notes already. Something along the line of:

Unlike many shells, Python does not automatically do tilde expansion or variable substitution in paths. Use expanduser for tilde expansion or expandvars for variable substitution.

Or just simply
Use expanduser for tilde expansion or expandvars for variable substitution in paths as the other path functions do not do this automatically.
History
Date User Action Args
2013-01-06 19:59:24ibshieldssetrecipients: + ibshields, georg.brandl, r.david.murray
2013-01-06 19:59:24ibshieldssetmessageid: <1357502364.51.0.401493883499.issue16877@psf.upfronthosting.co.za>
2013-01-06 19:59:24ibshieldslinkissue16877 messages
2013-01-06 19:59:24ibshieldscreate