I have this script:
from myhelperfunctions import *
# parse arguments
args = docopt(__doc__, version='mainprog 1.0')
myhelper1(args)
...
This is a script someone else maintains and I have no control over, so i cant modify it. The script structure looks like
/opt/app-to-import/{main.py, myhelperfunctions.py}
I want to run this code in another program in my home directory, but don't want to start a new process. so I tried exec()
and imp.load_source()
to load and run it inside the same process. But every time it complains saying no module named myhelperfunctions
. What is the right way to do this? I am using python2.7.