[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Extra blank line on pyuic4 generated code (4.8.3)
From: "Kelvin U.V" <kelvin.you () gmail ! com>
Date: 2011-02-22 5:19:22
Message-ID: AANLkTik0-AuTJ7tg8eKGP+sNbd4E6oMqKdtYJfJ4UADg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Tue, Feb 22, 2011 at 1:13 AM, Phil Thompson
<phil@riverbankcomputing.com>wrote:
> On Sat, 12 Feb 2011 18:31:49 +0800, "Kelvin U.V" <kelvin.you@gmail.com>
> wrote:
> > Hi ,
> >
> > I find the pyuic4 4.8.3 will generat more newline characters in each
> line.
> > 4.8.1 doesn't have this issue.
> >
> > Here is a temporary solution for this issue.
> >
> > def _generate(self):
> > """ Generate the Python code. """
> >
> > if sys.hexversion >= 0x03000000:
> > if self._opts.output == '-':
> > from io import TextIOWrapper
> >
> > - pyfile = TextIOWrapper(sys.stdout.buffer,
> encoding='utf8')
> > + pyfile = TextIOWrapper(sys.stdout.buffer,
> encoding='utf8',
> > newline='')
> > else:
> > pyfile = open(self._opts.output, 'wt', encoding='utf8')
> > else:
> > if self._opts.output == '-':
> > pyfile = sys.stdout
> > else:
> > pyfile = open(self._opts.output, 'wt')
> >
> > Hope it can be fixed in the next release. Thanks.
>
> I can't reproduce this (with Python v3.2) and your fix makes no
> difference.
>
> Phil
>
Yes, it can not reproduce in Python 3.2. This issue occurred on Python
3.1.2. It must be the issue for TextIOWrapper.
--
Best Regards
K.Y
[Attachment #5 (text/html)]
<br><br><div class="gmail_quote">On Tue, Feb 22, 2011 at 1:13 AM, Phil Thompson <span \
dir="ltr"><<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>></span> \
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> On Sat, 12 Feb 2011 \
18:31:49 +0800, "Kelvin U.V" <<a \
href="mailto:kelvin.you@gmail.com">kelvin.you@gmail.com</a>><br> wrote:<br>
<div><div></div><div class="h5">> Hi ,<br>
><br>
> I find the pyuic4 4.8.3 will generat more newline characters in each<br>
line.<br>
> 4.8.1 doesn't have this issue.<br>
><br>
> Here is a temporary solution for this issue.<br>
><br>
> def _generate(self):<br>
> """ Generate the Python code. """<br>
><br>
> if sys.hexversion >= 0x03000000:<br>
> if self._opts.output == '-':<br>
> from io import TextIOWrapper<br>
><br>
> - pyfile = TextIOWrapper(sys.stdout.buffer,<br>
encoding='utf8')<br>
> + pyfile = TextIOWrapper(sys.stdout.buffer,<br>
encoding='utf8',<br>
> newline='')<br>
> else:<br>
> pyfile = open(self._opts.output, 'wt', \
encoding='utf8')<br> > else:<br>
> if self._opts.output == '-':<br>
> pyfile = sys.stdout<br>
> else:<br>
> pyfile = open(self._opts.output, 'wt')<br>
><br>
> Hope it can be fixed in the next release. Thanks.<br>
<br>
</div></div>I can't reproduce this (with Python v3.2) and your fix makes no<br>
difference.<br>
<font color="#888888"><br>
Phil<br>
</font></blockquote></div><br>Yes, it can not reproduce in Python 3.2. This issue \
occurred on Python 3.1.2. It must be the issue for TextIOWrapper.<br \
clear="all"><br>-- <br>Best Regards<br>K.Y<br>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic