Re: portable way of locating an executable (like which)

Discussion in 'Python' started by Mark Lawrence, Sep 20, 2012.

  1. On 20/09/2012 22:06, Gelonida N wrote:
    > I'd like to implement the equivalent functionality of the unix command
    > /usr/bin/which
    >
    > The function should work under Linux and under windows.
    >
    > Did anybody already implement such a function.


    Searching found nothing obvious to me :(

    > If not, is there a portable way of splitting the environment variable PATH?


    With os.sep ?

    >
    > Thanks for any sugestions
    >
    >


    --
    Cheers.

    Mark Lawrence.
    Mark Lawrence, Sep 20, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gelonida N
    Replies:
    4
    Views:
    205
    Ramchandra Apte
    Sep 23, 2012
  2. Chris Angelico
    Replies:
    0
    Views:
    191
    Chris Angelico
    Sep 20, 2012
  3. Ian Kelly
    Replies:
    0
    Views:
    209
    Ian Kelly
    Sep 20, 2012
  4. Chris Angelico
    Replies:
    0
    Views:
    218
    Chris Angelico
    Sep 21, 2012
  5. Gelonida N
    Replies:
    0
    Views:
    187
    Gelonida N
    Sep 21, 2012
Loading...

Share This Page