I'm trying to import a python file to my application which is written in python.
I have the following code:
from os.path import basename
runcommand = __import__("/root/"+ os.path.splitext(os.path.basename(path))+ "/" + os.path.splitext(os.path.basename(path)) +"/sa/update.py")
When I run it, it gives me the following error:
ImportError: Import by filename is not supported.