[PyQt] Simple patch for pylupdate4

Phil Thompson phil at riverbankcomputing.com
Sun Sep 1 18:39:11 BST 2013


On Fri, 30 Aug 2013 17:47:05 +0200, Florent Rougon <f.rougon at free.fr>
wrote:
> Hello,
> 
> The following trivial patch to pylupdate/fetchtr.cpp (for PyQt 4.10.3)
> allows pylupdate4 to correctly process backslashes at the end of a line,
> instead of replacing such backslashes with a linefeed (ASCII 10)
> character. This is very useful in triple-quoted strings to avoid
> introducing newlines that don't exist in the original Python string.
> (this is *not* about "\n" sequences; these work fine, having an
> identical counterpart in C++ syntax)
> 
> Unfortunately, the patch only works for Python source files that have
> Unix-style line endings, but doesn't make things any worse for other
> newline styles. Ideally, Python source files would be read in some kind
> of universal newlines mode...
> 
> Could you please include it, or something similar?

Done - something similar.

Thanks,
Phil


More information about the PyQt mailing list