Odd behavior with imp.reload and logging

Andrew Berg bahamutzero8825 at gmail.com
Thu Sep 22 04:44:20 CEST 2011


On 2011.09.21 08:57 PM, Chris Angelico wrote:
> Unfortunately, Python doesn't really like modules to be reloaded. Are
> you able to explicitly close the logger before reloading?
The reload isn't controlled by the module, but I have no problem
clearing out any loggers at the beginning. I'm looking through the
logging docs, but I don't see what you mean by explicitly closing the
logger. Handler.close() doesn't help.

-- 
CPython 3.2.2 | Windows NT 6.1.7601.17640 | Thunderbird 6.0.2



More information about the Python-list mailing list