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

Trent Mick trentm at
Tue Aug 6 19:59:39 CEST 2002

[Noah wrote]
> Basically I want to write "which" in Python.

Or you could just download it. :)

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


Trent Mick
TrentM at

More information about the Python-list mailing list