Create an __init__.py file in the directory you wish to include.
So lets imagine we have two directories, one called src the other called utils.
If you have Main.py inside the src directory, and you wish to use a class named Network inside a file called Connections.py which is located in utils Then you could do the following.
Please note, the same applies to any folder you create that has a *.py file. For example,we can have folder a, b, c and you simply do from a.b.c import Connections, or whatever your file name may be...
1) Create an __init__.py file (it can simply be empty) inside the utils directory, then from your Main.py do the following.
from utils import Connections
my_instance = Connections.Network()
#Then use the instance of that class as so.
my_instance.whateverMethodHere()
The Directory would look like this:
root dir
- src
-__init__.py
- Main.py
- utils
-__init__.py
- Connections.py
For more details, you can check out the python documentation which goes more in-depth.
http://docs.python.org/tutorial/modules.html#packages
As per the link above, a bit more info on python packages, and why we use __init__.py:
When importing the package, Python searches through the directories on
sys.path looking for the package subdirectory.
The init.py files are required to make Python treat the
directories as containing packages; this is done to prevent
directories with a common name, such as string, from unintentionally
hiding valid modules that occur later on the module search path. In
the simplest case, init.py can just be an empty file, but it can
also execute initialization code for the package or set the all
variable, described later.