fperez528 at yahoo.com
Fri Jun 6 02:50:09 CEST 2003
Richard Muller wrote:
> I'm currently putting some python routines together in the form of a
> module using Distutils, and had a question I couldn't answer.
> It seems that Distutils is set up so that python routines are either
> packages or scripts. I use many of my programs as both -- I want them to
> be in a place where I can import routines from them, but I also use them
> as interactive scripts.
> Is there a simple way to do this within the framework of distutils? Up
> until now, I've just had may of these routines in a directory that is
> both in my PYTHONPATH and in my PATH.
standard solution: write very thin wrapper scripts (often one-liners) which call
your modules as scripts. The side advantage is that the modules get
byte-compiled, so startup time is a bit reduced.
More information about the Python-list