[PyQt] got stuck translating webftpclient example to PyQt
Moritz Warning
moritzwarning at web.de
Sun Feb 2 19:26:27 GMT 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/02/2014 03:46 PM, Hans-Peter Jansen wrote:
> On Sonntag, 2. Februar 2014 04:52:57 Moritz Warning wrote:
>> Alright, writing a detailed report gives you ideas. :)
>
> For this very reason, one third of all issues people have, vanish magically,
> if you ask them to create a minimal runnable example. ;-)
>
>> This is the fix:
>> https://github.com/mwarning/PyQt4-Examples/commit/655072921b5e34175e2ca7647a
>> e5d301c99d878b
>>
>> The signature for getData was wrong. But the error didn't show up on the
>> console (huh?). Debugging using eric4 shows the error.
>
> Converting Qt examples is a great learning experience.
>
> BTW, you should avoid using QString nowadays (in preference of Py3
> compatibility). Start your code with
>
> import sip
> sip.setapi('QString', 2)
>
> and use unicode strings, wherever QStrings are used in Qt..
>
>
> Pete
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
ok, I have switched to unicode strings.
Thanks for the pointer.
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)
- - mwarning
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Icedove - http://www.enigmail.net/
iQEcBAEBAgAGBQJS7pvjAAoJECHrh56PP4wpy/gIAKlsBQtQ2yXlgtMVoXA6NJ4U
Y7wJ2Hp+PXA6IgLZc71jgpd9ew/ie0IGVKVNKsNDvBu9+YESB3o+3LjtT89wGT/s
8AsqKgi/5YA/vZbZQaH57FVX7TiAfnC/eb7kXOIOlAY4ev7cWN+xWZ/zuPuwNZbV
v1yV4V912W6Vf180wgDmqEcqEpXtkqpP48jJ6o7lUEgImewmjUZXY+XmbxrForff
/PFmeSmyFX783kbK9pVP+5vnzCqjLJ7bnpjojIqslPnscGJVLnoyxjXSLSCyduKP
QuAYxkSHHsCgSJ20wug2Y2l2RsvvWyWZrPRpuyOaSNhnaeR9Mpcef53zlCPqS0o=
=0lp2
-----END PGP SIGNATURE-----
More information about the PyQt
mailing list