import - How to execute only some functions from other python modules? -
[problem] want execute functions other python modules
[input] module 1, module 2
module 1 includes:
- function called ( def a)
- function called ( def b)
[module 2] includes:
from module1 import b
current: function , function b executed. desired: function b should executed.
if have ideas please share.
if import module has code outside class/function, code run. if module calls function outside definition, runs. consider not calling function in module file.
Comments
Post a Comment