Python Packages and Modules
Question: I've never really needed to use packages and modules before in python but now
as my code base is getting bigger and bigger i'd like to structure it so its
imported easier.

I've got 10+ .py files that are all part of a package. Instead of doing
`import` each and every class when i need them, how can I just group them in
the same name space so that I can also reference `import package.componentA as
x`?

Right now when ever I utilize my all the code, I got to have the source files
in the same directory. Is it also possible to package this in a central
location so that I can have clean project code?

Thanks,


Answer: Use the `__init__.py` file in the package and import the modules you want to
use from there. So when you import the package it will import everything in
that file.

Some good info on this method [here](http://mikegrouchy.com/blog/2012/05/be-
pythonic-__init__py.html).

