i was missing "self" in my method signature!
doh!
--
http://mail.python.org/mailman/listinfo/python-list
Not sure if it matters, but this occurs when running a unittest.
The trace back is:
Traceback (most recent call last):
File "C:\Python24\Lib\threading.py", line 442, in __bootstrap
self.run()
File "C:\Python24\Lib\threading.py", line 422, in run
self.__target(*self.__args, **self.__kwa
bruno at modulix wrote:
> abcd wrote:
>
>>def makeThread(self, func, args=(), kwargs={}):
>>threading.Thread(target=self.blah, args=args,
>>kwargs=kwargs).start()
>
> Shouldn't it be:
>
> def makeThread(self, func, *args, **kwargs):
> threading.Thread(target=self.blah,
>
abcd wrote:
> I have class like this...
>
> import threading
> class MyBlah(object):
> def __init__(self):
> self.makeThread(self.blah, (4,9))
>
> def blah(self, x, y):
> print "X and Y:", x, y
>
> def makeThread(self, func, args=(), kwargs={}):
> threading.Th
"abcd" <[EMAIL PROTECTED]> wrote:
>I have class like this...
>
> import threading
> class MyBlah(object):
>def __init__(self):
>self.makeThread(self.blah, (4,9))
>
>def blah(self, x, y):
>print "X and Y:", x, y
>
>def makeThread(self, func, args=(), kwargs={}):
>
I have class like this...
import threading
class MyBlah(object):
def __init__(self):
self.makeThread(self.blah, (4,9))
def blah(self, x, y):
print "X and Y:", x, y
def makeThread(self, func, args=(), kwargs={}):
threading.Thread(target=self.blah, args=args,
kw