I wouldn't use threads for system calls. Checkout the subprocess
module instead. You can run multiple pipes at the same time
(subprocess.Popen). The python documentation for subprocess is pretty
good. There are a few examples. Actually, you don't even _need_ the
subprocess module, you can use os.po
On 2 Apr, 15:03, "Miki" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> >def run(self):
> > # -w 1 option topingmakes ittimeoutafter 1 second
> > pingcmd="/bin/ping-c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip
>
> Not sure, but "ip" should be "self.ip", this might cause theproblem.
Sorry, that w
Hello,
>def run(self):
> # -w 1 option to ping makes it timeout after 1 second
> pingcmd="/bin/ping -c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip
Not sure, but "ip" should be "self.ip", this might cause the problem.
HTH,
--
Miki <[EMAIL PROTECTED]>
http://pythonwise.blogspot.com
--
h
I wrote a quick script to check the "up-ness" of a list of machines,
and timeout after 1 second. However, with a lot of timeouts, the
script takes a logn time, so I thought to parallelise it. However, as
soon as I do, the pings that do not get a response never return, so
their threads block forever