Stefan> I use it as a library, because it encodes knowledge about Stefan> locating executables on different platforms, especially Windows. Stefan> Unixoids have which and the search is relatively Stefan> straightforward. Windows searches paths in PATH and in the Stefan> registry, and uses PATHEXT, so, for me, the main benefit of Stefan> which.py is that it provides a which replacement on Windows that Stefan> takes these quirks into account.
I'll second that. In SpamBayes we not so long ago added the ability to run OCR software over images to try and identify image-based spam. Needless to say, we had to write fairly different bits of code on Unix v. Windows to locate the gocr or ocrad executables. Having something like a platform-independent which available in Python would have made this aspect of the code easier to write. Skip _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com