[Distutils] Cross-platform way to get default directory for binary files like console scripts?
Vinay Sajip
vinay_sajip at yahoo.co.uk
Fri Feb 21 14:27:15 CET 2014
> Is there cross-platform way to get default directory for binary files
> (console scripts for instance)
Well, there's
$ /tmp/venv/bin/python
Python 3.3.0+ (3.3:c28b0b4e872b, Mar 25 2013, 17:51:34)
[GCC 4.6.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig; print(sysconfig.get_path('scripts'))
/tmp/venv/bin
>>>
$ python
Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sysconfig; print(sysconfig.get_path('scripts'))
/usr/local/bin
Regards,
Vinay Sajip
More information about the Distutils-SIG
mailing list