I am currently using Python 2.7 and I am trying to upload a file as follows:
myPlt = imp.load_source('SourceFile', 'path/to/SourceFile.py')
However, SourceFile.py imports the OtherModule module, which is located in the same directory as SourceFile. The package structure is as follows:
/path .../to ...SourceFile.py ...OtherModule.py ...__init__.py
When I run load_source, I get the error message "ImportError: No module named OtherModule"
Is my load_source wrong? Is there an alternative way that I should import a SourceFile?
source share