Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'resulting': 0.04; 'subject:Python': 0.06; 'subject: + ': 0.07; 'subject:code': 0.07; 'callback': 0.09; 'observation': 0.09; 'python': 0.11; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'once.': 0.16; 'posted.': 0.16; 'simulate': 0.16; 'soup': 0.16; 'subject:analysis': 0.16; 'think.': 0.16; 'attach': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'module': 0.19; 'trying': 0.19; 'small,': 0.19; 'seems': 0.21; 'putting': 0.22; 'header:User- Agent:1': 0.23; 'post': 0.26; 'subject:/': 0.26; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'michael': 0.29; "i'm": 0.30; 'code': 0.31; 'complete,': 0.31; 'with,': 0.31; 'stuff': 0.32; 'run': 0.32; 'maybe': 0.34; "can't": 0.35; 'but': 0.35; 'there': 0.35; 'replies': 0.36; 'surely': 0.36; "i'll": 0.36; 'example,': 0.37; 'christian': 0.38; 'message-id:@gmail.com': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'remove': 0.60; 'signal': 0.60; 'subject:Fwd': 0.61; "you're": 0.61; 'further': 0.61; 'kind': 0.63; 'here': 0.66; 'beautiful': 0.68; 'study': 0.69; 'obvious': 0.74; 'everything.': 0.84; 'fragments': 0.84; 'trader': 0.84 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Wed, 26 Nov 2014 20:57:40 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131118 Thunderbird/17.0.11 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Fwd: Python Signal/Slot + QThred code analysis References: <5473E188.5020608@gmail.com> <5474A333.2090207@mrabarnett.plus.com> <5474C889.5090503@mrabarnett.plus.com> <547545CF.60208@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1417060670 news.xs4all.nl 2918 [2001:888:2000:d::a6]:54579 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 4904 X-Received-Body-CRC: 1825055355 Xref: csiph.com comp.lang.python:81615 On 11/26/2014 02:55 PM, Juan Christian wrote: > On Wed Nov 26 2014 at 1:16:11 AM Michael Torrie wrote: > You're going to have to post a complete, but small, code example, I > think. Working with fragments of code is very difficult if not > impossible to assist with, resulting in obtuse, obvious replies from folks. > > As asked, here is all the code: > > outpost module: http://pastebin.com/H3K9UUWi > main module: http://pastebin.com/dFzums9W > > I was trying to do other things there but I ended up screwing everything. I'm sorry I can't run the code you posted. I don't seem to have any modules named "request" on Python 3 or Python 2 and your Trader.py seems to require it. You might want to remove the url downloading and Beautiful Soup stuff and put in some kind of nop loop instead to simulate it. For example, in the Trader module you can remove everything in run() and just have it return dummy values, maybe putting in a delay to simulate the work of downloading and parsing. Just an observation from looking at the main module code. You only need to attach a callback to a signal once. output_slot() seems to attach the callback each and every time the timer fires. This is surely wrong. I'll give it some further study this evening.