[Python-Dev] __file__

Steven D'Aprano steve at pearwood.info
Tue Mar 2 10:53:26 CET 2010


On Tue, 2 Mar 2010 11:41:52 am Barry Warsaw wrote:

> After PEP 3147 is implemented, and the default, you'll have to
> byte-compile the files, then find the pycs in the __pycache__
> directory, move them up a level and rename them.  Then of course
> remove the .py files.
>
> It's not insurmountable of course, I think if we support pyc-only
> imports, people are rightly going to want us to write and support the
> tool to create those imports.

Surely that's a job for a tiny Python script, or even a shell script? It 
doesn't sound hard, not from the description given. I imagine there 
will be recipes on ActiveState quite quickly, and if there isn't, that 
would be good evidence that demand for the feature is low.



-- 
Steven D'Aprano


More information about the Python-Dev mailing list