[PyQt] Simple patch for pylupdate4
Florent Rougon
f.rougon at free.fr
Fri Aug 30 16:47:05 BST 2013
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?
Thanks.
--
Florent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pylupdate_backslash_newline_handling.diff
Type: text/x-diff
Size: 665 bytes
Desc: Patch for backslash-newline escape sequences
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20130830/7b19a97e/attachment.diff>
More information about the PyQt
mailing list