New submission from Jakub Wilk: 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! ---------- files: test.py messages: 205787 nosy: jwilk priority: normal severity: normal status: open title: python -m imports non-ASCII .py file without encoding declaration versions: Python 2.7 Added file: http://bugs.python.org/file33076/test.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19941> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com