我在python中导入一个模块,并初始化该模块对象的一些额外属性。是否有可能将这些额外的属性反映在相应的文件中,而无需直接编辑这些文件。
答案 0 :(得分:1)
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