[PyQt] got stuck translating webftpclient example to PyQt
Hans-Peter Jansen
hpj at urpla.net
Mon Feb 3 21:18:06 GMT 2014
Dear Moritz,
On Sonntag, 2. Februar 2014 20:26:27 Moritz Warning wrote:
>
> ok, I have switched to unicode strings.
> Thanks for the pointer.
As an author of example code, you should adhere to a good coding style even
more closely than under other circumstances.
Therefore, you should indent with 4 spaces:
http://www.python.org/dev/peps/pep-0008/#code-lay-out.
Using * imports are considered harmful:
http://docs.python.org/3.3/howto/doanddont.html
For PyQt{4,5}, it's best practise to use:
from PyQt4 import QtCore, QtNetwork, QtWebKit
> Anyway, I looks like the cpp example (and for that reason my python port) is
> broken anyway. I created a minimal example. But it did not give me a clue
> and I haven't found other code to compare to, yet.
>
> Only a part of the expected content is displayed (the first 512 Bytes):
> Minimal example that demonstrates the problem:
>
> https://github.com/mwarning/PyQt4-Examples/blob/minimal/webftpclient/main.py
>
> (in case someone is interested and/or knows the answer)
I've glimpsed over it, and you're right: that's a blatant bug in either the
example or Qt itself. While I didn't harvested much success in filing Qt bugs
in the past, but it's still the best thing to do right now.
Let us know about the outcome, please.
Pete
More information about the PyQt
mailing list