On Wed, 2026-09-09 at 09:58 +0200, Pavel Sanda wrote:
> On Tue, Sep 08, 2026 at 10:44:04PM +0100, José Matos wrote:
> > 1. Please take the chance and remove the comment:
> > // Check whether this is a python 2 or 3 binary.
> >
> > This is no longer true since 2.5.x
>
> I am happy to ditch, but I saw explicit checks on python 2 while
> going through the code yesterday, eg in Graphicsconverter.
When I did the change I have only checked the python code, not C++.
Good catch.
> > 2. Another issue that can simplify a bit the code is to go from:
> >
> > const string info_script = "import sys; print('{}
> > ({})'.format(sys.version.split()[0],sys.executable), end='')";
> > to
> >
> > const string info_script = "import sys; print(f'{sys.version.split()[0]}
> > ({sys.executable})', end='')";
>
> Added. Please check the patch for your request. I prefer to commit separately
> to keep API change and P2/P3 failures separate for bisects.
I agree, and I even thought about it yesterday in the same terms. :-)
> > Incidentally, as you know, the f prefix refers to a formatted string.
>
> Do not underestimate me, as a python meh-thusiast I have no clue what f means
> :)
>
> That said please carefully check the patch, your message has new line in the
> snippet exactly in the spot where you could have '' or ' '. (' ' renders
> better
> in About). Or you really meant \n?
The new line is probably an artifact of the mail composer. :-(
In python it is not possible to have a line break in the middle of a string.
So the next code is invalid:
abc = "
"
This should be of course
abc = "\n"
Just for completeness sake the code above will work as
abc = """
"""
That is the purpose of triple quotes.
</end of unsolicited python tips>
> Pavel
Best regards,
--
José Abílio
--
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel