Suppose that I load dynamically a module from a file with sys.__import__
, where are defined some variables with values.
Then I modify these 'variables' during execution.
Is there a way to save this new variables as py code in an other file name , like an __export__(module, fileName)
call ?
Asked
Active
Viewed 85 times
0

maiagarbot
- 147
- 1
- 2
- 15
-
Why dont' you just use environment variables and then use python's os like in http://stackoverflow.com/questions/5971635/setting-reading-up-environment-variables-in-python – dmitryro Jun 22 '16 at 15:56
-
I try dynamic code load. In this code, there are variables with initial values. I want to load them (__import__), then run my program with some changes on some variables, and after to save the new state of the module in a dedicated file. – maiagarbot Jun 23 '16 at 17:03