[Python-Dev] __file__ and bytecode-only
v+python at g.nevcal.com
Thu Mar 4 03:33:21 CET 2010
On approximately 3/3/2010 5:49 PM, came the following characters from
the keyboard of Barry Warsaw:
> On Mar 03, 2010, at 07:37 PM, Jim Jewett wrote:
>> >I understand the need to ship without source -- but why does that
>> >require supporting .pyc (or .pyo) -only?
>> >Couldn't vendors just replace the real .py files with empty files?
> Yes, I think that's a possibility. What would people think about that?
That's kooky, but not as kooky as my idea. As mentioned elsewhere,
timestamps would have to be treated carefully.
In this scenario, the .pyc files would still live in __pycache__ ?
Complete with the foo.<token>.pyc naming ?
So one could actually create a "fat .zip" application that could work
with a variety of installed Python versions ??? Hmm...
Glenn -- http://nevcal.com/
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
More information about the Python-Dev