reimport module
Henning Peters
pete at dexterslab.de
Fri May 31 09:35:44 EDT 2002
Hi NG,
i am currently implementing a restart-function in a server software.
Restarting the server should cause a shutdown and a new startup of all
network connections and services and the reload of the server's
configuration. The configuration file is stored as a normal python file that
is imported by several modules over the built-in 'import' statement.
The problem is, that python caches the file instead of rereading it so that
a change of the configuration and a later restart of the server would take
no effect.
Is it possible to flush this cache or is it better to implement an own
config parser instead of using a python file as config file?
Bye,
Henning
More information about the Python-list
mailing list