home::which

which.py

In the quest of having a which utility for the windows platform without the need to install cygwin I wrote which.py. Actually it is just a evolution of a script of Ned Batchelder

It contains some improvements against its unix conterpart. For example it is able find all commands that match a pattern. That could be usefull for the one that only know part of the name of a commands.

News

13 february 2003 I add pattern matching capabilities to help you to find commands when you only now part of it.

14 january 2003 The first release of which.py is available for download.

Documentation

The goal of the which.py script is to works as which as much as possible. There is some small differences and some feature that grep.py do not yet support.

Here is the list of supported flag of which.py:

-a, --all Print all matching executables in PATH, not just the first.
--skip-dot Skip directories in PATH that start with a dot.
--show-dot Don't expand a dot to current directory in output.
--regexp Consider the programname as a regular expression.
-v, -V, --version
 Print version and exit successfully.
-h, --help Print this help and exit successfully.

Download

Here you can download the latest version of which.py As which.py is a Python script you will need a python distribution to run it.

last update: 17/09/2004 10:34:42