So each package in Python is a directory, and the directory has to
have a special file which has this very special name __init__.py.
I know this seems very silly.
The designers of the Python language created this file name as something they
thought no one would ever actually call a file that.
And so they don't expect it to be a problem for
you to create a file with a special name.
So there doesn't have to be anything in this file, in fact in general you don't
need to put anything in it so it could be an empty file.
But it indicates to Python that directory contains a Python package.
So it can be imported the same way a module is imported.
So let me give you an example.
Suppose you have several modules, dnautil.py, which we talked about at
another lecture, which contains useful functions to process DNA sequences.
Let's suppose you also have a rnautil.py module which has some other
functions about RNA.
It may be a protein.py file which contains functions that process protein sequences.
You'd like to group them all together in a package that we're going to call bioseq
which processes all different types of bio sequences.
So here's a possible structure for your package.
You have a directory called bioseq.
And inside of that, you have this init.py, which remember is __init__.py.
And then you have your three packages, dnautil.py, rnautil.py, and
proteinutil.py.
And you can have more as well, so you might even have
some additional submodules under that, or subpackages, called fasta and fast.
Which might have, let's say fastautil.py and
fastqutil.py, and each of those could be packages too,
which means that those directories also contain the __init__.py special file name.