On Fri, Aug 08, 2003 at 09:03:05AM +0200, Alexandre Fayolle wrote:

> You always can copy the .py[co] files in
> /usr/lib/python2.X/site-packages at install time. Since these directory
> come before /usr/lib/site-python in the default sys.path, the compiled
> modules will be used on import. 
> 
> Now this has some unpleasant consequences: 
>  * python no longer has a way of seeing if the .pyc is up to date
>  * I think this screws up the exception reporting routines in python
> 
> Maybe this could be handled with symlinks?

Of course, all this require manual handling from the user. What I was
proposing would require a whole PEP and some reasonable design and
implementation, etc, so Python itself could map those .pyc to their
original file, only resorting to them if the original .py/.pyc are not
synced; deleting them if they're not usefult any more, etc.


Reply via email to