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