i have a configuration file in python that can be changed while the main script is running, so i need to reload it.
i tried the answer in this post: python refresh/reload
import config
from config import *
...
reload(config)
from config import *
it worked until i entered the reload part to a function, so if i do this:
import config
from config import *
def main():
reload(config)
from config import *
i get the warning: 'import *' only allowed in module level, the script is running but the reload isn't working,
i also tried "import config" instead of "from config import *" but i got an exception "UnboundLocalError: local variable 'config' referenced before assignment"