On Tue, 2024-01-30 at 19:26 +0100, Enrico Forestieri wrote:
> For making it work with Python 3 on Windows I had to patch both our 
> lyxpak.py script and getopt.py from Python.
> Attached you will find the patch to be applied to lyxpak.py, the
> patch I 
> had to apply to getopt.py and the patched version (lyxwin_getopt.py) 
> that should be distributed with LyX.
> In this way lyxpak.py works for me with both Python 2 and 3, in both 
> Windows and Linux.

The culprit, from your analysis, seems to be that on windows some
variables are bytes instead of strings (unicode text on Python 3).

Would not it be easier to convert the bytes to unicode, in the cases
where we need (read windows), and then it is not necessary to change
getopt and friends?

I am finishing other tasks and so I had not a proper look into this
issue and so I am admit to be wrong.

Best regards,
José Abílio
lyx-devel mailing list

Reply via email to