where is Python Tools/scripts directory?

Discussion in 'Python' started by Michele Simionato, May 15, 2004.

  1. 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
    Michele Simionato, May 15, 2004
    #1
    1. Advertising

  2. 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
    Skip Montanaro, May 15, 2004
    #2
    1. Advertising

  3. Skip Montanaro <> wrote in message news:<>...
    > 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
    Michele Simionato, May 18, 2004
    #3
  4. 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
    Skip Montanaro, May 18, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Namratha Shah \(Nasha\)
    Replies:
    0
    Views:
    599
    Namratha Shah \(Nasha\)
    Nov 23, 2004
  2. Jan Danielsson
    Replies:
    8
    Views:
    613
    Mike Meyer
    Jul 22, 2005
  3. Jp Calderone
    Replies:
    0
    Views:
    445
    Jp Calderone
    Jul 21, 2005
  4. davidj411
    Replies:
    0
    Views:
    483
    davidj411
    Jun 27, 2008
  5. Replies:
    13
    Views:
    516
    Anno Siegel
    Sep 10, 2007
Loading...

Share This Page