# author Angus Leeming
# with much advice from members of the preview-latex project:
# David Kastrup, dak@gnu.org and
-# Jan-Åke Larsson, jalar@mai.liu.se.
+# Jan-Åke Larsson, jalar@mai.liu.se.
# Full author contact details are available in file CREDITS
def find_exe(candidates, path):
for prog in candidates:
for directory in path:
- full_path = os.path.join(directory, prog)
+ if os.name == "nt":
+ full_path = os.path.join(directory, prog + ".exe")
+ else:
+ full_path = os.path.join(directory, prog)
+
if os.access(full_path, os.X_OK):
return full_path