Re-loading updated modules

Paul McGuire ptmcg at austin.rr._bogus_.com
Tue Jun 27 09:32:29 EDT 2006


"fileexit" <mayyash at gmail.com> wrote in message
news:1151414294.809032.44850 at u72g2000cwu.googlegroups.com...
> Hi,
> Shouldn't python recompile a module if there is a later version of the
> code (.py file)? While i am debuging, i always have to exit python and
> delete the pyc before every run, then start it again and import the
> modules.  It seems that this is the only way for it to recompile the
> new code.
>
> What is going on? is this normal behaviour? I noticed that on both
> Windows and linux (Fedora Core 4, and 5 and RHEL 4)
>
If there is a later .py file, and you restart Python, Python will recompile
the modules when you import them.

-- Paul






More information about the Python-list mailing list