Message92134
All code:
[code]
# -*- coding: cp1251 -*-
import os.path
var = r'${APPDATA}\Microsoft\Windows\Start Menu'
print os.path.expandvars(var)
print os.path.expandvars(unicode(var, 'cp1251'))
[/code]
Console session:
[code]
C:\Users\Леново\AppData\Roaming\Microsoft\Windows\Start Menu
Traceback (most recent call last):
File "C:\Lang\test\python\expandvars_bug.py", line 6, in <module>
print os.path.expandvars(unicode(var, 'cp1251'))
File "C:\Lang\Python\26\lib\ntpath.py", line 388, in expandvars
res = res + c
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcb in position 9:
ordinal not in range(128)
[/code] |
|
Date |
User |
Action |
Args |
2009-09-01 08:34:01 | shura_zam | set | recipients:
+ shura_zam, ezio.melotti |
2009-09-01 08:34:01 | shura_zam | set | messageid: <1251794041.68.0.442801428154.issue6815@psf.upfronthosting.co.za> |
2009-09-01 08:34:00 | shura_zam | link | issue6815 messages |
2009-09-01 08:33:59 | shura_zam | create | |
|