Module/Directory cleanup

Quinn Dunkan quinn at pfennig.ugcs.caltech.edu
Fri Feb 18 00:51:32 EST 2000


On Thu, 17 Feb 2000 22:48:34 GMT, Robert Hicks <rhicks at rma.edu> wrote:
>I have Python, wxPython, and PythonWin loaded on my system and I have PY
>files all over the place. How about all modules going into one directory.
>This would cleanup not only the many subdirectories that are prevalant but
>would also create a cleaner import path. Upgrade and installs would be
>easier and cleaner also.

Sounds like a good idea.  Post your login and password and maybe some kind
soul will clean up your directory structure for you.

Seriously, though, my convention is:

user specific modules and packages go in ~/py, which is in PYTHONPATH set by
shell rc.  site-specific modules I write go in the ~/py/local package.

system wide modules go in <python lib>/site-packages
system wide local modules go in <python lib>/site-packages/local


That way, you can maintain your own python library as a user, and it is clear
from directory structure and python code which modules are grabbed off the net
and which are local to this machine, and a python re-install won't touch any
of it.



More information about the Python-list mailing list