Jose,

I've been getting Paul Rubin to test a python version of the "instant 
preview for lyx 1.3.x" script. Win32 users currently don't have 
access to this eye candy, mainly because so many unix utilities need 
to be installed first and, crucially, all these utilities need to 
work. Amazing how many are buggy.

The lyxpreview2ppm.py that he's tested is essentially the same as 
legacy_lyxpreview2ppm.py that you fixed up so elegantly. However, he 
had to make one little change.

 def find_exe(candidates, path):
        for prog in candidates:
                for directory in path:
-                       full_path = os.path.join(directory, prog)
+                       full_path = os.path.join(directory, prog + ".exe")
                        if os.access(full_path, os.X_OK):
                                return full_path

        return None

How do we do this portably?
Angus


Reply via email to