python library call equivalent to `which' command

destroooooy destroooooy at gmail.com
Mon Jun 29 13:54:38 EDT 2009


Hi,
  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.

TIA

Craig



More information about the Python-list mailing list