Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81511

Re: Python Signal/Slot + QThred code analysis

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 <juan0christian@gmail.com>
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&gt;': 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; '&quot;': 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 <CAAp0bGttki1B=1q5SX_C39L_dRB22YOQiTbVxdvo4jSee0srcw@mail.gmail.com> <CAAp0bGsgMTK7MS1Wvh13304et7Bb7XUyfZTU8ZmF2++BuLj7dw@mail.gmail.com> <5473E188.5020608@gmail.com>
From Juan Christian <juan0christian@gmail.com>
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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16284.1416923898.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon Nov 24 2014 at 11:56:31 PM Michael Torrie <torriem@gmail.com> 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__

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Python Signal/Slot + QThred code analysis Juan Christian <juan0christian@gmail.com> - 2014-11-25 13:58 +0000

csiph-web