Python: how to reload modules that have been imported with *
Question: I know that if I import a module by name `import(moduleName)`, then I can
reload it with `reload(moduleName)`

But, I am importing a bunch of modules with a Kleene star:

    
    
    from proj import *
    

How can I reload them in this case?


Answer: I think there's a way to reload all python modules. The code for Python 2.7 is
listed below: Instead of importing the math module with an asterisk, you can
import whatever you need.

    
    
    from math import *
    from sys import *
    
    Alfa = modules.keys()
    modules.clear()
    
    for elem in Alfa:
        str = 'from '+elem+' import *'
        try:     
            exec(str)     
        except: 
            pass
    

