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

2014-02-21 Thread Piotr Dobrogost
On Thursday, February 20, 2014 4:34:25 PM UTC+1, Piotr Dobrogost wrote: > > I'm wondering if there's some API to get this info as what you showed is > really roundabout way to achieve the goal... Turns out there is API for this - see thread on distutils-sig mailing list at https://mail.python.o

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

2014-02-20 Thread Ned Batchelder
On 2/20/14 10:55 AM, Oscar Benjamin wrote: On 20 February 2014 15:42, Ned Batchelder wrote: As roundabout and advanced as that code is, it doesn't give the right answer for me. It returns None. On my Mac, after activating a virtualenv: Python 2.7.2 (default, Oct 11 2012, 20:14:37)

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

2014-02-20 Thread Piotr Dobrogost
On Thursday, February 20, 2014 4:42:54 PM UTC+1, Ned Batchelder wrote: > > As roundabout and advanced as that code is, it doesn't give the right > answer for me. It returns None. Indeed. I tried on Linux and got None both inside and outside virtualenv :( Regards, Piotr -- https://mail.python.

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

2014-02-20 Thread Oscar Benjamin
On 20 February 2014 15:42, Ned Batchelder wrote: > > As roundabout and advanced as that code is, it doesn't give the right answer > for me. It returns None. On my Mac, after activating a virtualenv: > > Python 2.7.2 (default, Oct 11 2012, 20:14:37) > [GCC 4.2.1 Compatible Apple Clang 4.0

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

2014-02-20 Thread Oscar Benjamin
On 20 February 2014 15:34, Piotr Dobrogost wrote: > On Thursday, February 20, 2014 4:22:53 PM UTC+1, Oscar Benjamin wrote: > >> You can find the default location in this roundabout way: > > I'm wondering if there's some API to get this info as what you showed is > really roundabout way to achieve

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

2014-02-20 Thread Ned Batchelder
On 2/20/14 10:34 AM, Piotr Dobrogost wrote: 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 setup.py install' or 'pip install ...'?

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

2014-02-20 Thread Piotr Dobrogost
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 setup.py install' or 'pip install ...'? > Yes. > If so there are > different p

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

2014-02-20 Thread Oscar Benjamin
On 20 February 2014 14:27, Piotr Dobrogost 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? > > Conte

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

2014-02-20 Thread Ned Batchelder
On 2/20/14 9:27 AM, Piotr Dobrogost wrote: Hi! 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? Context: There's Python script

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

2014-02-20 Thread Piotr Dobrogost
Hi! 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? Context: There's Python script which runs various tools like pip using subp

Re: Console Scripts

2005-06-03 Thread Simon Brunning
On 3 Jun 2005 01:21:04 -0700, Prema <[EMAIL PROTECTED]> wrote: > Just something which will be a simple answer for someone . > With an interactive python script, sometimes it seems necessary to > clear the terminal in order to provide a clear presentation to users > > With Bash then we just do

Console Scripts

2005-06-03 Thread Prema
Hi People ! Just something which will be a simple answer for someone . With an interactive python script, sometimes it seems necessary to clear the terminal in order to provide a clear presentation to users With Bash then we just do a 'clear' statement but this does not seem to work well in p