.pyc files

Arne Koewing ark at gmx.net
Wed Jan 29 00:12:26 CET 2003


"Newt" <newt_e at blueyonder.co.uk> writes:

> "Peter Hansen" <peter at engcorp.com> wrote in message

> As suggested, I want to compile from within IDE so that my .pyc file gets
> updated.
> Perhaps there is an alternative approach though.
> Is it possible to force an import to reproduce the .pyc file? e.g. if I have
> a file newt_i.py, which is imported by newt.py, then
> when I first run it newt_i.pyc get 'compiled' to newt_i.pyc. If I then
> change newt_i.py, and run newt.py, then it will still import the existing
> newt_i.pyc, not a .pyc version of the new file. Is this correct?
>
a .pyc file ill only be used if (and only if) the timestamps 
(and sizes?) of the .pyc file and the .py file are *exactly* the
same...




More information about the Python-list mailing list