I have def myfunc()
in script2.py
, script3.py
, script4.py
. In script1.py
, I want to call myfunc
from script2, script3 and script 4.
In script1.py
, rather than tediously listing out:
from script2.py import myfunc
myfunc()
from script3.py import myfunc
myfunc()
from script4.py import myfunc
myfunc()
Is there a way that I can import myfunc
from all scripts present in that same directory?