Re: Threading problem

2010-04-25 Thread Patrick Maupin
On Apr 25, 2:55 pm, sdistefano wrote: > I have the following issue: > > My program runs a thread called the MainThread, that loops trough a > number of URLs and decides when it's the right time for one to be > fetched.  Once a URL has to be fetched, it's added to a Queue object, > where the Fetchi

Re: Threading problem / Paramiko problem ?

2009-12-28 Thread MRAB
mk wrote: Hello everyone, I wrote "concurrent ssh" client using Paramiko, available here: http://python.domeny.com/cssh.py This program has a function for concurrent remote file/dir copying (class SSHThread, method 'sendfile'). One thread per host specified is started for copying (with a wo

Re: threading problem..

2007-10-25 Thread John Nagle
Tried that on Python 2.5 on Windows and it worked. John Nagle Abandoned wrote: > Hi.. > I want to threading but i have a interesting error.. > == > class SelectAll(threading.Thread): >def __init__(self, name): > threading.Thread.__init

Re: threading problem..

2007-10-25 Thread Diez B. Roggisch
Abandoned schrieb: > Hi.. > I want to threading but i have a interesting error.. > == > class SelectAll(threading.Thread): >def __init__(self, name): > threading.Thread.__init__(self) > self.name = name #kelime > >def run(self): > > > self.result=.

Re: Threading problem when many sockets open

2007-08-25 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Philip Zigoris wrote: > ... and the server > would go into a state where the master thread repeatedly polled the > socket and printed an error. Is that because it cannot create a new socket to accept the connection on? -- http://mail.python.org/mailman/listinfo/py

Re: Threading problem

2006-04-18 Thread Diez B. Roggisch
> Here the error message: Exception in thread Thread-1: > Traceback (most recent call last): > File "C:\Program Files\Python\lib\threading.py", line 442, in > __bootstrap > self.run() > File "G:\Robot teleskop\VRT\test\test2.py", line 25, in run > Document.OpenFile('F:/Images/VRT

Re: Threading problem

2006-04-17 Thread Aleksandar Cikota
Thank You, but now it cannot open a file, but it should work... Here the error message: >>> Exception in thread Thread-1: Traceback (most recent call last): File "C:\Program Files\Python\lib\threading.py", line 442, in __bootstrap self.run() File "G:\Robot teleskop\VRT\test\test2.py", line

Re: Threading problem

2006-04-17 Thread Faber
Aleksandar Cikota wrote: > How to integrate the Code-part in the main programm, so that the > mainprogramm works? > > Code: > > import win32com.client > import time > import os > import threading > > Document = win32com.client.Dispatch('MaxIm.Document') > Application = win32com.client.Dispatch(

Re: Threading Problem

2004-12-22 Thread Ishwor
On Wed, 22 Dec 2004 12:55:46 +, Alan Kennedy <[EMAIL PROTECTED]> wrote: > [Norbert] > > i am experimenting with threads and get puzzling results. > > Consider the following example: > > # > > import threading, time > > > > def threadfunction(): > > print "threadfunction:

Re: Threading Problem

2004-12-22 Thread Fredrik Lundh
Steve Holden wrote: > Well, I don't believe there's any guarantee that a thread will get run > preference over its > starter - they're both threads, after all. Try putting a sleep after > th.start() and before the > print statement and you should see that the "worker" thread runs while the >

Re: Threading Problem

2004-12-22 Thread Norbert
Thanks Alan, i hoped it would be something trivial :) Norbert -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading Problem

2004-12-22 Thread Norbert
Thanks a lot, Steve, for your fast reply. But the behaviour is the same if 'threadfunction' sleeps longer than just 1 second. 'threadfunction' is of course a dummy to show the problem, imagine a longrunning background-task. If you are right, the question remains 'How can I assure that the starting

Re: Threading Problem

2004-12-22 Thread Alan Kennedy
[Norbert] > i am experimenting with threads and get puzzling results. > Consider the following example: > # > import threading, time > > def threadfunction(): > print "threadfunction: entered" > x = 10 > while x < 40: > time.sleep(1) # time unit is seconds >

Re: Threading Problem

2004-12-22 Thread Steve Holden
Norbert wrote: Hello *, i am experimenting with threads and get puzzling results. Consider the following example: # import threading, time def threadfunction(): .print "threadfunction: entered" .x = 10 .while x < 40: .time.sleep(1) # time unit is seconds

Re: threading problem

2004-12-10 Thread Egor Bolonev
On Fri, 10 Dec 2004 00:12:16 GMT, Steven Bethard <[EMAIL PROTECTED]> wrote: I think if you change the call to look like: threading.Thread(target=run, args=(os.path.join('c:\\', path),)).start() oh i see now. thanks s='sdgdfgdfg' s == (s) True s == (s,) False -- http://mail.python.org/mailman/li

Re: threading problem

2004-12-09 Thread Steven Bethard
Egor Bolonev wrote: hi all my program terminates with error i dont know why it tells 'TypeError: run() takes exactly 1 argument (10 given)' [snip] threading.Thread(target = run, args = (os.path.join('c:\\', path))).start() I believe the args argument to threading.Thread is supposed to b