Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: detecting install location of python tools

Tags:

python

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.

like image 477
noamtm Avatar asked Jun 20 '26 21:06

noamtm


1 Answers

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.

like image 164
Senthil Kumaran Avatar answered Jun 23 '26 17:06

Senthil Kumaran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!