Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.018 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.06; 'subject: + ': 0.07; 'subject:code': 0.07; "'')": 0.09; 'skip:\\ 10': 0.09; 'def': 0.12; 'subject:analysis': 0.16; 'wrote:': 0.18; 'module': 0.19; 'email addr:gmail.com>': 0.22; 'looks': 0.24; 'this:': 0.26; 'subject:/': 0.26; 'testing': 0.29; 'michael': 0.29; "doesn't": 0.30; 'skip:& 60': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'getting': 0.31; '"': 0.31; 'second,': 0.31; 'file': 0.32; 'run': 0.32; '(most': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'skip:" 50': 0.36; 'nov': 0.38; 'work?': 0.38; 'to:addr:python-list': 0.38; 'that,': 0.38; 'recent': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'remove': 0.60; 'skip:t 30': 0.61; 'first': 0.61; 'skip:m 50': 0.68; 'inheritance,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:from:date:message-id:subject:to :content-type; bh=yZhpICfPvbF0Cgt+ijK/racj2Rw3v+vRvmdxDEyVyYY=; b=AAtjTIE7P8xNdAdaXHT5D+GvsWw3uqGvu3mR/ROoG6VXx9WE5Ryemj1/13Lp1Y1fdM m39z9F8QMcut+dJYSOQo6sanQUyySYNaMIf56d4LP2iKAa/nkrgPLvw4Vfbb7QDOS0Gx SYPzVCIGX/0gy8+3rbd7x/FMOVzgNvs9kAbHSeiuKO81i+kNS37RynJMhNrjue1os4cm 3g+jOe5nBqrYcK4ZielH8olDdiFy6DsmlF3Tt5FQVnDKYJFKyXlofMDM2OG4m3fpNKrv OPKwETls7qDYQzU2imMdmMqlZ/cCuY3UMP+o8+9Bl9NwIOHAzdbweboakNKzw0l+6wYH grig== X-Received: by 10.140.98.54 with SMTP id n51mr36909292qge.79.1416923896279; Tue, 25 Nov 2014 05:58:16 -0800 (PST) MIME-Version: 1.0 References: <5473E188.5020608@gmail.com> From: Juan Christian Date: Tue, 25 Nov 2014 13:58:15 +0000 Subject: Re: Python Signal/Slot + QThred code analysis To: python-list@python.org Content-Type: multipart/alternative; boundary=001a113ac2ae82fcd00508af4dd7 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 55 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416923898 news.xs4all.nl 2912 [2001:888:2000:d::a6]:43721 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:81511 --001a113ac2ae82fcd00508af4dd7 Content-Type: text/plain; charset=UTF-8 On Mon Nov 24 2014 at 11:56:31 PM Michael Torrie wrote: Looks alright. Does it work? Well, no =/ First I had to remove the multiple inheritance, because Qt doesn't allow that, so I removed the QObject. Second, just for testing I'm calling the module directly using: timer = QTimer() timer.start(5000) def output_slot(): outpost = Outpost('123456') outpost.start() MainWindow.vlay.addWidget(create_box(outpost.info_a + " : " + outpost.info_b)) timer.timeout.connect(output_slot) But I'm getting this: Traceback (most recent call last): File "D:\Documents\PyCharm\Trader\Trader\core\outpost.py", line 18, in run with soup.select('div.stat_box div.value')[0].get_text().replace(',', '') as trades, \ AttributeError: __exit__ --001a113ac2ae82fcd00508af4dd7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon Nov 24 2014 at 11:56:31 PM Michael Torrie <torriem@gmail.com> wrote:
Looks alright. Does it = work?

Well, no =3D/

First I had= to remove the multiple inheritance, because Qt doesn't allow that, so = I removed the QObject.

Second, just for testing I&= #39;m calling the module directly using:

timer =3D= QTimer()
timer.start(5000)

def = output_slot():
=C2=A0 =C2=A0 outpost =3D Outpost('123456&= #39;)
=C2=A0 =C2=A0 outpost.start()
=C2=A0 =C2=A0 M= ainWindow.vlay.addWidget(create_box(outpost.info_a + " : " + outp= ost.info_b))

timer.timeout.connect(output_slot= )

But I'm getting this:

Traceback (most recent call last):
=C2=A0 File "= D:\Documents\PyCharm\Trader\Trader\core\outpost.py", line 18, in run
=C2=A0 =C2=A0 with soup.select('div.stat_box div.value')[0= ].get_text().replace(',', '') as trades, \
Attrib= uteError: __exit__


--001a113ac2ae82fcd00508af4dd7--