Message205787
If you have a non-ASCII .py file without encoding declaration, then you can't normally import it:
$ python --version
Python 2.7.6
$ python -c 'import test'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "test.py", line 1
SyntaxError: Non-ASCII character '\xc2' in file test.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
However, "python -m" happily imports such files:
$ python -m test
¡Hello world! |
|
Date |
User |
Action |
Args |
2013-12-10 11:04:57 | jwilk | set | recipients:
+ jwilk |
2013-12-10 11:04:57 | jwilk | set | messageid: <1386673497.85.0.313178291575.issue19941@psf.upfronthosting.co.za> |
2013-12-10 11:04:57 | jwilk | link | issue19941 messages |
2013-12-10 11:04:57 | jwilk | create | |
|