Cross-platform way to get default directory for binary files like console scripts?

Piotr Dobrogost p at
Thu Feb 20 16:34:25 CET 2014

On Thursday, February 20, 2014 4:22:53 PM UTC+1, Oscar Benjamin wrote:
> I'm not sure if I understand the question. Are you trying to find
> where a script would go if it had been installed as a result of
> 'python install' or 'pip install ...'? 

> Yes.

> If so there are
> different places it could go depending not only on the system but also
> how the packages were installed (e.g. --user).


> You can find the default location in this roundabout way:
> (...)
> In [5]: c.install_scripts
> Out[5]: '/usr/local/bin'

I think this is pretty much what I'm after, thanks.
I'm wondering if there's some API to get this info as what you showed is really roundabout way to achieve the goal...


More information about the Python-list mailing list