Message260825
os.path.dirname is documented as the first element of os.path.split, which in turn is documented to be empty when there's no slash in the path.
An empty string is treated as the current directory by os.path.abspath. This is in line with an empty element in the PATH environment variable. Also, Python's sys.path uses an empty string for the current directory. If you want a dot for display and logging purposes, normalize via os.path.normpath:
>>> os.path.normpath('')
'.' |
|
Date |
User |
Action |
Args |
2016-02-24 18:21:34 | eryksun | set | recipients:
+ eryksun, eric.smith, serhiy.storchaka, Chaitanya Mannem |
2016-02-24 18:21:34 | eryksun | set | messageid: <1456338094.28.0.865562051818.issue26429@psf.upfronthosting.co.za> |
2016-02-24 18:21:34 | eryksun | link | issue26429 messages |
2016-02-24 18:21:34 | eryksun | create | |
|