On Wednesday 14 April 2004 14:37, Angus Leeming wrote: > One thing I don't know how to do: > # Ascertain whether the latex and dvipng > # executables are available. > latex = "latex" > dvipng = "dvipng" > > I'd like to write a little function to loop over a list of 'possible' > names (lib/configure checks for pplatex latex2e latex) and return the > first one found in the path. Any ideas on how to do that?
Something like this? Notice that I tried to use the generic functions so this should work in any platform that supports the PATH environment variable. One small inconvinience that I still don't know how to overcome, I will test if the program exists in the path not if it is executable. I will try to search a generic way to test this... -- José Abílio LyX and docbook, a perfect match. :-)
path-test.py
Description: application/python