Patches for Python scripts
forenr at lyx.org
Mon Feb 1 11:01:34 UTC 2021
On Mon, Feb 01, 2021 at 03:42:43AM +0100, Thibaut Cuvelier wrote:
> Thank you for testing on your side :)! What's frustrating with your report
> is that this bug can only appear on Python 2, and that it will very likely
> be dropped for the next release (I remember seeing people wanting to keep
> it for LyX 2.4). Nevertheless, I'm trying to do a few things about it.
Even if support for Python 2 is being discontinued, it is not going to
disappear overnight. So, supporting it for some more time is right, IMHO.
> What I've been doing: change the output when looking for programs, with a
> more explicit "not in path" instead of "no", and the same for the registry
> check; convert the result of winreg.QueryValueEx to a string (in Python 2,
> it looks like it's a byte array, hence the error). If that doesn't work, I
> really don't know what to do, apart from not telling the user what Java
> binary was found.
> I'm attaching a differential patch (unnamed8) for the latest changes, plus
> a complete updated patch that should replace the original 0013 patch. Does
> it work for you?
Yes! This works also in a cygwin shell. Thanks!
checking for a java interpreter...
+checking for "java"... not in path
+checking for java: found in Windows registry, C:\Program Files (x86)\Java\jre1.
> More generally, what about the other patches? Are formatting changes
> considered risky? What about Joel's suggestions?
I am leaving these to our python experts.
More information about the lyx-devel