Creating Python Modules

Dave Kuhlman dkuhlman at
Fri Mar 26 02:41:19 CET 2004

Adam T. Gautier wrote:

> Greetings,
> I am trying to create a python module for a series of class files
> that because of their size I have divided into multiple files.
> class Foo -->
> class Boo -->
> I have created a where I have for the "py_modules=['foo',
> 'boo']".  when I run "%>./ install" it copies all *.py and
> *.pyc to /usr/lib/python2.2/site-packages.
> When I goto use the module I have to use:
> import foo
> import boo
> I would like if anyone could help me to be able to:
> 1.)  Get the *.py and *.pyc (foo and boo) generated with the
> install to install to "/usr/lib/python2.2/site-packages/mymodule".

I think you want to include the "packages" option or the
"package_dir" option in your

See section "3.1 Listing whole packages" in "Distributing Python
Modules" at:


dkuhlman at

More information about the Python-list mailing list