Fwd: Python Signal/Slot + QThred code analysis

Michael Torrie torriem at gmail.com
Wed Nov 26 22:57:40 EST 2014


On 11/26/2014 02:55 PM, Juan Christian wrote:
> On Wed Nov 26 2014 at 1:16:11 AM Michael Torrie <torriem at gmail.com> 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.




More information about the Python-list mailing list