On 21 February 2014 13:24, Paul Moore <p.f.mo...@gmail.com> wrote:
>>
>> Is there cross-platform way to get default directory for binary files
>> (console scripts for instance) the same way one can use sys.executable
>> to get path to the Python's interpreter in cross-platform way?
>
> sysconfig.get_path("scripts") should work. If you're on a Python too
> old to have sysconfig then sorry, I've no idea (other than "you should
> upgrade" :-))

Ah, well that's better.

One question though: are these guaranteed to be consistent. I was
pointing at the actual code that distutils uses when installing where
as you're pointing at a module that independently lists an
over-lapping set of data:
http://hg.python.org/cpython/file/005d0678f93c/Lib/sysconfig.py#l21
http://hg.python.org/cpython/file/005d0678f93c/Lib/distutils/command/install.py#l28

For example sysconfig defines a scheme 'osx_framework_user' that
doesn't appear in distutils.command.install and uses slightly
different paths from posix_user. Does that mean that it is
inconsistent with what distutils would do?


Oscar
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to