python library call equivalent to `which' command

destroooooy destroooooy at
Mon Jun 29 19:54:38 CEST 2009

  I'm looking for a Python library function that provides the same
functionality as the `which' command--namely, search the $PATH
variable for a given string and see if it exists anywhere within. I
currently examine the output from `which' itself, but I would like
something more portable. I looked through the `os' and `os.path'
modules but I didn't find anything.



More information about the Python-list mailing list