Take the 2-minute tour ×

Python's installation comes with some handy tools, located under $YOUR_PYTHON/Tools/Scripts. Is there a platform-independent way to find out where on a system they are located? I want to use ftpmirror.py as part of a shell script.

share|improve this question
N.B. On Fedora there is a separate package named python-tools which might not be installed. –  Cristian Ciupitu Jan 18 '11 at 8:58
add comment

1 Answer

up vote 5 down vote accepted

I see you are talking about the source bundle of Python, which includes Tools/Scripts, a set of helpful scripts for working with Python Source. It should be noted that they are not a part of Python Standard Library and installers are not obliged to bundle them with their distribution, for e.g in Ubuntu, I don't find it in /usr/lib/python2.6 or some other path.

If you want to rely on any of the Tools/Scripts, just carry them along with your script, that would be most portable.

share|improve this answer
Thanks. I assumed that since the Windows installer includes it, others also do. –  noamtm Jan 18 '11 at 8:57
FYI, as of the upcoming Python 3.2 release, the Mac OS X installers will install the Tools directory under /Applications/Python 3.2/Extras. That's where the Demo directory used to be; it has been removed with the most useful demos updated and placed under Tools for Python 3.2. –  Ned Deily Jan 18 '11 at 10:05
@Ned, that is a helpful information. Thanks. –  Senthil Kumaran Jan 18 '11 at 10:16
add comment

Your Answer


