hunch hunch - 1 month ago 10
Python Question

How to reflect changes in the module object to module file in python

I am importing a module in python, and initializing some extra attributes for that module object. Is it possible that those extra attributes to be reflected in corresponding files without editing those files directly.

Answer

Could you achieve a similar effect by having your module read and write from a separate configuration file? Perhaps using something simple like pickle or json, or something more standard like docs.python.org/2/library/configparser.html