Re: how to set timeout for os.popen

2018-04-15 Thread Jason Friedman
> > while 1: > runner = os.popen("tracert -d www.hello.com") > o=runner.read() > print(o) > runner.close() > runner = os.popen("tracert -d www.hello.com") > o=runner.read() > print(o) > runner.close() > runner = os.popen("tracert -d www.hello.com") > o=runner.read() > print(o) > runner.close() > >

Re: how to set timeout for os.popen

2018-04-15 Thread MRAB
On 2018-04-15 12:01, Ho Yeung Lee wrote: while 1: runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runn

Re: Ways to make a free variable local to a function?

2018-04-15 Thread Yubin Ruan
On 2018-04-15 13:31, Kirill Balunov wrote: > > > 2018-04-15 10:58 GMT+03:00 Yubin Ruan : > > [this is a bit late...] > > Did you really have any benchmark for it? I know what you are doing but it > seems to be a pre-mature optimization. If this really is the case, then we > can

how to set timeout for os.popen

2018-04-15 Thread Ho Yeung Lee
while 1: runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() runner = os.popen("tracert -d www.hello.com") o=runner.read() print(o) runner.close() after running over 1 hour, it