[Tutor] PySide 1.2.2 and Python 3 - "native Qt signal is not callable"

Juan Christian juan0christian at gmail.com
Sun Aug 31 00:32:26 CEST 2014


Sorry for double-post.

I did as you said, now I get this:

[image: Imagem inline 1]

I did a 'print(line)' and it seems to be working, " b'# The daily noon
exchange rates for major foreign currencies are published every business
day at about 12:30' ".

Code: http://pastebin.com/SgVdeKGm


2014-08-30 19:18 GMT-03:00 Juan Christian <juan0christian at gmail.com>:

> I analyzed the code and found two mistakes:
>
> 1. I wrote 'startsWith', and not 'startswith'
> 2. I forgot to encode, I needed to use '.read().decode("utf-8")' rather
> than '.read()' only.
>
> This way I get the text correctly (http://pastebin.com/qy4SVdzK). I'm
> still analyzing the code and fixing things, the program isn't 100% working
> yet.
>
>
>
>
>
>
> 2014-08-30 19:03 GMT-03:00 Danny Yoo <dyoo at hashcollision.org>:
>
> > So the loop really should be:
>> >
>> >         for line in fh.split("\n"):
>> >               ...
>>
>>
>> Ah, apologies.  Forgot that we're in Python 3 land.  We have to be
>> consistent with the types a lot more.  This should be:
>>
>>          for line in fh.split(b"\n"):
>>                ...
>>
>> Apologies.  I should have tested with a Python 3 interpreter in hand.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140830/84f0926e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 6789 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20140830/84f0926e/attachment-0001.png>


More information about the Tutor mailing list