Re: [Tutor] checking return status of 'ping' in windows

2012-01-21 Thread Alan Gauld
On 21/01/12 18:47, Nikunj Badjatya wrote: Normal ping operation on windows cmd prompt can give 3 outputs. 1) "destination host unreachable 2) "request timed out" 3) "Reply from 192.168.1.1 : bytes=32 time=3ms TTL=64" Now, I was expecting the "status" in above snippet to hold

Re: [Tutor] checking return status of 'ping' in windows

2012-01-21 Thread Hugo Arts
On Sat, Jan 21, 2012 at 7:47 PM, Nikunj Badjatya wrote: > Hi All, > > I am using the following snippet to check the availability of an IP address. > If that IP addr is found free than it can be used later on for further > operations. > Python ver 3.2 > Windows OS > > {{{ > pingret = subprocess.Pop

[Tutor] checking return status of 'ping' in windows

2012-01-21 Thread Nikunj Badjatya
Hi All, I am using the following snippet to check the availability of an IP address. If that IP addr is found free than it can be used later on for further operations. Python ver 3.2 Windows OS {{{ pingret = subprocess.Popen('ping {0}'.format(IPaddr), shell=True,universal_newlines=True, \