[PyQt] How to properly escape white spaces and weird chars in SOURCES

Giuseppe Corbelli corbelligiuseppe at mesdan.it
Tue May 14 07:47:23 BST 2019


On 5/14/19 2:02 AM, michael h wrote:
> 
>     SOURCES = \
>           white space.py
>           sp&cial.py
> 
>     The current error is:
>     corbelli at corbelli-linux:~/devel/pylupdate-special$
>     /opt/python/bin/pylupdate5  -verbose weirdchars.pro
>     <http://weirdchars.pro>
>     pylupdate5 error: Cannot open Python source file
>     '/home/corbelli/devel/pylupdate-special/white': No such file or
>     directory
>     pylupdate5 error: Cannot open Python source file
>     '/home/corbelli/devel/pylupdate-special/space.py': No such file or
>     directory
> 
> The qmake docs say: Usually, whitespace separates values in variable 
> assignments. To specify values that contain spaces, you must enclose the 
> values in double quotes:
> 
> DEST = "Program Files"

Yeah, got that, but:
1) AFAIK lupdate and pylupdate do not share anything, so QT 
documentation is not really accurate
2) It does not work (pylupdate5 error: Cannot open Python source file 
'/home/corbelli/devel/pylupdate-special/"white': No such file or directory)

As far as I understand the problem is that the 
qpy/pylupdate/proparser.cpp splits on ' ' (around line 142). Am I correct?

-- 
Giuseppe Corbelli


More information about the PyQt mailing list