Generating .pyc/.pyo from a make file

Just just at xs4all.nl
Thu Feb 3 06:57:18 EST 2005


In article <ctscc1$isf$1 at news1.tilbu1.nb.home.nl>,
 vincent wehren <vincent at visualtrans.de> wrote:

> Tim Daneliuk wrote:
> > Steve Holden wrote:
> > 
> >> Roland Heiber wrote:
> >>
> >>> Tim Daneliuk wrote:
> >>>
> > Aha!  Exactly ... and that makes perfect sense too.  D'oh!  I guess a 
> > better
> > distribution strategy would be to have the installation program generate 
> > the pyo
> > file at installation time...
> > 
> > Thanks -
> 
> Also, the *.py? files contain the full pathname of the *.py they have 
> been compiled from.

True.

> Copying them to other path locations will give you 
> the wrong __file___ information in tracebacks.

This is not 100% accurate: yes, the traceback shows the original source 
file path, yet module.__file__ does point to the actual .pyc file it was 
loaded from.

Just



More information about the Python-list mailing list