1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$ mkdir FluidPackage
$ touch FluidPackage/__init__.py
$ # now we test importing this package
$ python
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import FluidPackage
>>> # ctrl+c to exit back to shell
$ # okay, importing the top level package works
$ # now lets add subpackages and some source modules
$ mkdir FluidPackage/1D/
$ touch FluidPackage/1D/__init__.py
$ mkdir FluidPackage/1D/Channels/
$ touch FluidPackage/1D/Channels/__init__.py
$ touch FluidPackage/1D/Channels/Channels.py
$ mkdir FluidPackage/1D/Pipes/
$ touch FluidPackage/1D/Pipes/__init__.py
$ touch FluidPackage/1D/Pipes/Pipes.py
$ python
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> # Here are some import examples
>>> import FluidPackage
>>> from FluidPackage import Channels
>>> from FluidPackage.Channels import Channels
>>> from FluidPackage import Pipes
>>> from FluidPackage.Pipes import Pipes