[Python-Dev] __file__

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 1 06:21:52 CET 2010

Glenn Linderman wrote:

> If your text editor blows up because it is binary, it is a sad text editor.

Blow up is probably an exaggeration, but even just getting
a screen full of gibberish when I think I'm opening a
text file is a jarring experience.

> If you have .py mapped to a text editor, that's sort of kooky too; I 
> have it mapped to Python.

On Windows the action for double-clicking is usually
mapped to running the file, but there's typically another
action such as "Open with IDLE" or whatever available,
and a bytecode file named with ".py" would allow you to
apply that action to it.


More information about the Python-Dev mailing list