[Distutils] installing scripts into the user's PATH

Phillip J. Eby pje at telecommunity.com
Thu Jan 3 22:16:29 CET 2008

At 02:17 PM 1/3/2008 -0600, Carl Karsten wrote:
>Phillip J. Eby wrote:
>>At 12:03 PM 1/3/2008 -0600, Carl Karsten wrote:
>>>"Scripts are files containing Python source code, intended to be 
>>>started from
>>>the command line." http://docs.python.org/dist/node11.html
>>>I want to do that.  I am hoping that once it is done, it will be 
>>>in a dir that
>>>is in the user's OS PATH.  (if that sounds restrictive, I didn't 
>>>say it right.
>>>at this point, I don't care what dir it is in, as long as the user 
>>>doesn't have
>>>to type it.  like /usr/bin on linux.  not sure where the right 
>>>place would be on
>>>Is this supported?
>>The default locations on everything but Windows will generally have 
>>this work.  For Windows, there isn't much you can do except tell 
>>people to make sure the Python "Scripts" directory is added to their PATH.
>so if I do:
>  scripts=['foo.py', 'bar.py']
>where will they be copied?

On unixes, they will typically go to the same directory where the 
`python` executable itself lives.  On Windows, they'll go to the 
Scripts subdirectory of the Python installation directory.

More information about the Distutils-SIG mailing list