Odd behavior with imp.reload and logging

Chris Angelico rosuav at gmail.com
Wed Sep 21 21:57:42 EDT 2011


On Thu, Sep 22, 2011 at 11:53 AM, Andrew Berg <bahamutzero8825 at gmail.com> wrote:
> What causes this, and how can I fix it (or at least work around it)? Due
> to the nature of the program, it's much more convenient to reload a
> module than to restart the entire program (especially when testing).
>

Unfortunately, Python doesn't really like modules to be reloaded. Are
you able to explicitly close the logger before reloading?

ChrisA



More information about the Python-list mailing list