where do my python files go in linux?

Mike Meyer mwm-keyword-python.b4bdba at mired.org
Sat Jan 12 21:25:53 CET 2008

On Sat, 12 Jan 2008 16:13:08 +0100 "Jorgen Bodde" <jorgen.maillist at gmail.com> wrote:
> > Normally you'd split up the bulk of the code into a module which gets
> > installed into site-packages and a piece of stand-alone front-end code which
> > imports the module and executes whatever you need to do and gets installed
> > into a typical PATH directory.
> I would agree but it is not a site package I am trying to distribute,
> but a wxPython application. I would not think my app belongs in the
> python site packages dir.

I suspect that's because your app is "simple", in that it only has one
command. Many apps have multiple commands that share the same set of
libraries. So putting a package for that app in site-packages makes a
lot of sense. If your app-specific library is properly designed and
documented, users may be able to build further commands for the system
as well.

On the issue of .pyc files - don't distribute them. Instead, arrange
for the install package to run the compileall.py script (in the
standard library) on your libraries. .pyc files are *not* guaranteed
to be platform independent (even though the latest rpm tools seem to
claim otherwise), so if you build them for your platform, they may
well be unusable after being installed.

Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

More information about the Python-list mailing list