Uwe Stöhr wrote:

> Am 04.06.2015 um 18:17 schrieb Georg Baum:
> 
>>> Could some pythionist please review this?
>>
>> First you need to explain why you use this complicated quoting, and what
>> problem it solves.
>> If such a quoting is really needed,
> 
> Of course it is necessary otherwise I wouldn't have done it that way.
> Since Python is not in the PATH variable one needs the full path. As
> Window's default installation path has spaces one need to quote the path.

Quoting a path with spaces is definitely needed for the command interpreter, 
but in every sane programming language you do not need to do it if you 
structure your program a bit. In this case, it means to put the path into 
one variable, and the program name into another one as explained by Günter. 
This makes the code much more readable. Then you do not need any quoting, 
except for one place: Where the final command is written into the rc file.

> Attached is a better patch that does this. It also extends the fix to
> for libreoffice.

It still has this complicated quoting. I still do not understand why it has 
to be done this way.

>> Finally, the interface of getInkscapeBinary() needs to be the same
>> for windows and unix, having quoted stuff for one OS and not for the
>> other will lead to bugs.
> 
> This should now be the case with the attached patch.

At least the function names (e.g. quotedWinPath) suggest that the quoting is 
still windows specific.


Georg

Reply via email to