How to properly package/distribute a pure python module?
MatthewS at HeyAnita.com
Mon Jul 28 20:45:18 CEST 2003
Are there any guidelines for packaging a pure python module?
Specifically, say I have a set of 10 functions, all of varying
behaviors (no unifying theme to bind them together into clear
subsets), that I would like to make available to others. What is the
best structure for the distributed module? A single file called
"functions.py" that people can put in "site-packages"? A
subdirectory called "MyFunctions" with an "__init__.py" and the
"functions.py" files? Or should the functions be broken out into
I'm sure it depends on some other factorsbut are there general rules
for constructing a nice, logical package for others to use?
 site-packages/functions.py (from functions import f1)
 site-packages/MyFunctions/functions.py, __init__.py (from
MyFunctions.functions import f1)
 site-packages/MyFunctions/__init__.py, f1.py, f2.py, f3.py (from
MyFunctions.f1 import f1)
More information about the Python-list