How do I find executable files from the environment PATH variable?

Michael Gilfix mgilfix at eecs.tufts.edu
Tue Aug 6 22:16:15 CEST 2002


  It's interesting that this is the second time in a week
that this has appeared in this newsgroup with various
people asking for help :)

               -- Mike

On Tue, Aug 06 @ 10:59, Trent Mick wrote:
> [Noah wrote]
> > Basically I want to write "which" in Python.
> 
> Or you could just download it. :)
> 
>     http://starship.python.net/~tmick/
> 
> > Am I forced to check every directory in PATH 
> > and test each one with os.access()? If so then
> > will this script duplicate the actions of the
> > shell in searching for an executable file?
> 
> Getting this right on Windows is a little bit of a pain.

-- 
Michael Gilfix
mgilfix at eecs.tufts.edu

For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html




More information about the Python-list mailing list