Python Modules

Import from .py #

If the target file is located in the same directory as the current script:

import .<script without the .py ending>

To import a specific object:

from .<script without the .py ending> import <object>

If the target file is located within an adjacent directory:

import <directory name>.<script without the .py ending>