Message9676
$ mkdir /tmp/ćśź
$ touch /tmp/ćśź/{a,b}.py
$ cat test.py
# coding: utf-8
import sys
sys.path.append("/tmp/ćśź")
print("sys.path[-1]: %r" % sys.path[-1])
import a
print(a)
sys.path[-1] = u"/tmp/ćśź"
print("sys.path[-1]: %r" % sys.path[-1])
import b
print(b)
$ python2.7 test.py
sys.path[-1]: '/tmp/\xc4\x87\xc5\x9b\xc5\xba'
<module 'a' from '/tmp/ćśź/a.py'>
sys.path[-1]: u'/tmp/\u0107\u015b\u017a'
<module 'b' from '/tmp/ćśź/b.py'>
$ jython2.7 test.py
sys.path[-1]: '/tmp/\xc4\x87\xc5\x9b\xc5\xba'
Traceback (most recent call last):
File "test.py", line 5, in <module>
import a
ImportError: No module named a |
|
Date |
User |
Action |
Args |
2015-03-19 12:41:22 | Arfrever | set | recipients:
+ Arfrever, zyasoft |
2015-03-19 12:41:22 | Arfrever | set | messageid: <1426768882.53.0.64160350544.issue2294@psf.upfronthosting.co.za> |
2015-03-19 12:41:22 | Arfrever | link | issue2294 messages |
2015-03-19 12:41:22 | Arfrever | create | |
|