I have a python script named script_A
. I need a function present in another script named script_B
located in the same directory as script_A
.
When I execute script_A
, everything goes well until the commands importing the function are executed: script_B
is executed.
I just want to benefit from the use of the function in script_A
and do not want script_B
to be executed.
Here is my code :
from script_B import my_function