Message146204
For Python 2:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
>>> os.path.abspath('.')
'C:\\Users\\yuv\\Desktop\\YuvDesktop\\??????'
>>> os.path.abspath(u'.')
u'C:\\Users\\yuv\\Desktop\\YuvDesktop\\\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5'
For Python 3:
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32
>>> os.path.abspath('.')
'C:\\Users\\yuv\\Desktop\\YuvDesktop\\\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5'
>>> os.path.abspath(b'.')
b'C:\\Users\\yuv\\Desktop\\YuvDesktop\\??????'
The returned path with question marks is completely useless. It's better that python throw an error than return the question marks. Another option is to try and get the ascii version of the path, I believe windows has one. |
|
Date |
User |
Action |
Args |
2011-10-22 23:45:24 | ubershmekel | set | recipients:
+ ubershmekel |
2011-10-22 23:45:24 | ubershmekel | set | messageid: <1319327124.52.0.956024299245.issue13247@psf.upfronthosting.co.za> |
2011-10-22 23:45:23 | ubershmekel | link | issue13247 messages |
2011-10-22 23:45:23 | ubershmekel | create | |
|