On Tue, 2026-09-08 at 23:18 +0200, Pavel Sanda wrote:
> On Tue, Sep 01, 2026 at 08:35:31PM +0200, Pavel Sanda wrote:
> > On Mon, Aug 31, 2026 at 09:54:20PM +0200, Pavel Sanda wrote:
> > > The first batch of patches tries to sanitize runCommand() calls.
> > 
> > The next one uses new startscriptArgv to close kpsewhich hole
> > in a less fragile way.
> 
> The third one in our march for ditching runCommand from the source
> code kicks it from python probes. Jose, you might want to have a look.
> 
> Pavel

The code is reasonable and IMHO it makes sense.
If it works fell free to update it,

With that said I have two notes that are already there.

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


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='')";

This code only works with python 3 is thus also, in a sense, a leftover from the
transition since we have never took the chance to simplify the code. The
previous code works, obviously, IMHO the new code is easier to read since it
puts the variables in the place where they are used and not only use a
placeholder.

Incidentally, as you know, the f prefix refers to a formatted string. Python
format strings are the main inspiration of the fmt library in C++ standard
library. :-)

Best regards,
-- 
José Abílio
-- 
lyx-devel mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to