473,395 Members | 1,454 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 3130

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

147
by: Sateesh | last post by:
Hi, I am a beginner in Python, and am wondering what is it about the indentation in Python, without which python scripts do not work properly. Why can't the indentation not so strict so as to give...
3
by: Joseph Quigley | last post by:
hiya, i'm new to python (by a week) but am learning fast (that's what I like about python--it's simplicity). I got disgusted with C and C++ (i was learning) probably because of a bad copy of...
35
by: Michael Kearns | last post by:
I've been using python to write a simple 'launcher' for one of our Java applications for quite a while now. I recently updated it to use python 2.4, and all seemed well. Today, one of my...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 378 open ( +3) / 3298 closed (+34) / 3676 total (+37) Bugs : 886 open (-24) / 5926 closed (+75) / 6812 total (+51) RFE : 224 open...
5
by: Cappy2112 | last post by:
I've just started a job which has a massive python2.3.4-centric tools installation and configuration. I know what you're going to say, but I can't upgrade and be the only one with a newer...
34
by: Ben Sizer | last post by:
I've installed several different versions of Python across several different versions of MS Windows, and not a single time was the Python directory or the Scripts subdirectory added to the PATH...
3
by: joe jacob | last post by:
I configured apache to execute python scripts using mod_python handler. I followed below mentioned steps to configure apache. 1. In http.conf I added <Directory...
7
by: Yansky | last post by:
I asked my hosting company if they would upgrade Python on my server to the latest version. They responded with: "Sorry no. We tend to stick with what comes packaged with the unix distribution...
1
by: Lawrence D'Oliveiro | last post by:
Has anyone been able to run user-defined Python macros in OpenOffice.org 3.0? I had one in ~/.ooo-2.0/user/Scripts/python/try.py which did work under Ooo2.x. So I put the same thing in...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.