[Python-Dev] __file__

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 1 00:22:19 CET 2010

Glenn Linderman wrote:
> if the 
> command line/runpy can do it, the importer could do it.  Just a matter 
> of desire and coding.  Whether it is worth pursuing further depends on 
> people's perceptions of "kookiness" vs. functional and performance 
> considerations.

Having .py files around that aren't source text could
lead to a lot of confusion, given that most platforms
these days decide which application to open for a given
file based solely on the filename extension. I wouldn't
enjoy trying to open a .py file only to have my text
editor blow up because it was actually a binary file.

So on balance I think it's a bit too kooky for my


More information about the Python-Dev mailing list