day72 importlib module

A, importlib module
the importlib Import 

RES = 'confi.setting'
Module1 = importlib.import_module (RES) # line to import the module string, that the module name to get the corresponding namespace
print (module.NAME)

Guess you like

Origin www.cnblogs.com/qingqinxu/p/11276652.html
Recommended