PythonCard timer/thread tutorial
nebson at gmail.com
Wed Dec 24 23:56:45 CET 2008
This is my first post. Nice to meet you all! Could one of you walk me
through this code?
A little thread we've added
print "myThread: entered"
q = argtuple
print "myThread: starting loop"
x = 10
time.sleep(10) # time unit is seconds
print "myThread x=%d" % x
q.put(str(x)) # stick something on message queue
wx.WakeUpIdle() # triggers 'idle' handlers
x += 10
It is from David McNab and Alex Tweedly's tutorial on timers and
threads, which can be found here:
Among my questions are:
""" A little thread we've added""" seems to be an isolated string. It
does not seem to be doing anything there, almost like a comment. Why
is it there?
What is argtuple for? how does it work?
What is the queue for?
More information about the Python-list