Re: async fuction

2013-01-12 Thread MRAB
On 2013-01-12 04:43, alek...@silk.bz wrote: Hello. Can someone help me to resolv error. code: [snip] @Async def fnc(pi, pp): print "fnc-" i=pi while ( i < 1000 ) : i=i+1 print "fnc+" pass @Async def fnc1(pp): print "fnc1-",pp @Async def fnc2():

Re: async fuction

2013-01-11 Thread Chris Angelico
On Sat, Jan 12, 2013 at 3:43 PM, wrote: > def fnc1(pp): > print "fnc1-",pp > > fnc1() Like the message says, the function has been defined to take one argument, and you're giving it none. Try giving it an argument: fnc1("five-minute") ChrisA -- http://mail.python.org/mailman/listinfo/pyth

async fuction

2013-01-11 Thread aleksey
Hello. Can someone help me to resolv error. code: import threading class TimeoutError(RuntimeError): pass class AsyncCall(object): def __init__(self, fnc, callback = None): self.Callable = fnc self.Callback = callback def __call__(self, *args, **kwargs): s