A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-February/098000.html below:

[Python-Dev] __file__

[Python-Dev] __file__Guido van Rossum guido at python.org
Sat Feb 27 05:32:18 CET 2010
On Fri, Feb 26, 2010 at 5:13 PM, Brett Cannon <brett at python.org> wrote:
> On Fri, Feb 26, 2010 at 15:35, Glenn Linderman <v+python at g.nevcal.com>
>> When a .pyc is renamed to .py, Python (3.1 at least) recognizes and uses
>> it... I assume by design, rather than accident, but I don't know the
>> history.
>
> This does not work for me (nor should it):
>> touch temp.py
>>
>> python3 -c "import temp"
>>
>> rm temp.py
>>
>> mv temp.pyc temp.py
>>
>> python3 -c "import temp"
>>
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "temp.py", line 2
> SyntaxError: Non-UTF-8 code starting with '\x95' in file temp.py on line 2,
> but no encoding declared; see http://python.org/dev/peps/pep-0263/ for
> details

Try "python temp.py" though.

-- 
--Guido van Rossum (python.org/~guido)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4