Distutils question

Richard Muller rpm at wag.caltech.edu
Thu Jun 5 19:51:53 EDT 2003


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.

That is, can I do something like

setup(name="mymodule",
       packages=["mymodule"]
       scripts=["mymodule/script1.py"]
       )

I don't even know what this would do. Would it put mymodule/script1.py 
in both the site-packages/mymodule directory and somewhere on my path?

Thanks in advance for any help you can offer.

Rick





More information about the Python-list mailing list