How to import the class within the same directory or sub directory?
Python 2 Make an empty file called __init__.py in the same directory as the files. That will signify to Python that it’s “ok to import from this directory”. Then just do… The same holds true if the files are in a subdirectory – put an __init__.py in the subdirectory as well, and then use regular import statements, with dot … Read more