Re: Re-loading updated modules

2006-06-27 Thread Paul McGuire
"fileexit" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 > modu

Re: Re-loading updated modules

2006-06-27 Thread Fredrik Lundh
"fileexit" <[EMAIL PROTECTED]> wrote: > Shouldn't python recompile a module if there is a later version of the > code (.py file)? it does, when the module is first loaded. > While i am debuging, i always have to exit python and > delete the pyc before every run deleting the PYC shouldn't be nec

Re: Re-loading updated modules

2006-06-27 Thread Pierre Quentel
Instead of exiting the interpreter, you can use reload() : see the section "Built-in functions" in the library reference "reload( module) Reload a previously imported module. The argument must be a module object, so it must have been successfully imported before. This is useful if you have edited