469,590 Members | 1,949 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,590 developers. It's quick & easy.

where is Python Tools/scripts directory?

Is there a simple way to get the path to the Python Tools/scripts directory?

Currently I have defined by hand an environment variable such as

PYTHONSCRIPTS=/home/myhome/packages/Python-2.3.3/Tools/scripts

so I can alias the more useful scripts in my .bashrc (for instance
alias dutree=$PYTHONSCRIPTS/dutree.py), but this approach is PITA,
I have to change the variable each time I change machine and at each
new Python version. Is there a better way?

TIA,

Michele Simionato
Jul 18 '05 #1
3 2920

Michele> Is there a simple way to get the path to the Python
Michele> Tools/scripts directory? Currently I have defined by hand an
Michele> environment variable such as

Michele> PYTHONSCRIPTS=/home/myhome/packages/Python-2.3.3/Tools/scripts

Michele> so I can alias the more useful scripts in my .bashrc (for
Michele> instance alias dutree=$PYTHONSCRIPTS/dutree.py), but this
Michele> approach is PITA, I have to change the variable each time I
Michele> change machine and at each new Python version. Is there a
Michele> better way?

I'm not aware of a better way short of identifying those scripts of interest
and modifying setup.py to install them in $PREFIX/bin. In setup.py search
for "Tools/scripts" and modify the list. Feel free to submit a patch to SF
if you think those scripts would be of broader interest and ought to be
installed by default.

Skip

Jul 18 '05 #2
Skip Montanaro <sk**@pobox.com> wrote in message news:<ma************************************@pytho n.org>...
Michele> Is there a simple way to get the path to the Python
Michele> Tools/scripts directory?
I'm not aware of a better way short of identifying those scripts of interest
and modifying setup.py to install them in $PREFIX/bin. In setup.py search
for "Tools/scripts" and modify the list. Feel free to submit a patch to SF
if you think those scripts would be of broader interest and ought to be
installed by default.


I just discovered that in my installation at work (which is a Debian
distribution not managed by me) there is a copy of Tools/scripts in

/usr/share/doc/python2.3/examples/Tools/scripts

May I assume that this location is typical of Linux installations?
Michele
Jul 18 '05 #3

Michele> I just discovered that in my installation at work (which is a
Michele> Debian distribution not managed by me) there is a copy of
Michele> Tools/scripts in

Michele> /usr/share/doc/python2.3/examples/Tools/scripts

Michele> May I assume that this location is typical of Linux
Michele> installations?

I think that would be an invalid assumption.

Skip

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

147 posts views Thread by Sateesh | last post: by
3 posts views Thread by Joseph Quigley | last post: by
reply views Thread by Kurt B. Kaiser | last post: by
5 posts views Thread by Cappy2112 | last post: by
7 posts views Thread by Yansky | last post: by
1 post views Thread by Lawrence D'Oliveiro | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.