<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff size=2>Try 
this:</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2><code></FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff size=2>import 
os</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2>pinginfo=os.popen("ping www.google.com")</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff size=2>#opens 
file object with output of the ping to google</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff size=2>print 
pinginfo.read(-1)</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff size=2>#reads 
the ping information from the abuv file object</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2>pinginfo.close()</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2>#closes the pinginfo object, as you would do for a standard file 
object</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2></code></FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff size=2>Note 
that pinginfo is actually a file object, and as such, you must treat it as you 
would any file you are reading to, readlines, read, etc.</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2>HTH,</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2>Brandon McGinty</FONT></SPAN></DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=236383200-15042006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV><!-- Converted from text/plain format --><FONT 
face=Arial color=#0000ff size=2></FONT><BR>
<P><FONT size=2>----------<BR>Feel free to contact me for technical support, or 
just to chat; I always have time to talk and help, and an open 
ear.<BR>Email:Brandon.mcginty@gmail.com<BR>Skype:brandon.mcginty<BR>Msn:brandon_mcginty@hotmail.com<BR>Aim:brandonmcginty 
(Not currently available.)<BR>Cell:4802025790 (Weekends and nights only, 
please.)<BR>"Kindness is a language that the deaf can hear and the blind can 
see."<BR>Mark Twain<BR></FONT></P>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
  python-list-bounces+brandon.mcginty=gmail.com@python.org 
  [mailto:python-list-bounces+brandon.mcginty=gmail.com@python.org] <B>On Behalf 
  Of </B>david brochu jr<BR><B>Sent:</B> Friday, April 14, 2006 5:04 
  PM<BR><B>To:</B> python-list@python.org<BR><B>Subject:</B> re: 
  ping<BR><BR></FONT></DIV>
  <DIV style="DIRECTION: ltr">
  <DIV>Thanks,</DIV>
  <DIV> </DIV>
  <DIV>Unfortunately substituting os.system with os.popen results in the output 
  being:</DIV>
  <DIV><BR><open file 'ping <A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="http://www.google.com/" target=_blank>www.google.com</A><BR>', mode 'r' 
  at 0x009C4650><BR><open file 'ping <A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="http://www.boston.com/" target=_blank>www.boston.com</A><BR>', mode 'r' 
  at 0x009C4650> <BR><open file 'ping <A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="http://www.espn.com/" target=_blank>www.espn.com</A><BR>', mode 'r' at 
  0x009C4650> <BR><open file 'ping <A 
  onclick="return top.js.OpenExtLink(window,event,this)" 
  href="http://www.redsox.com/" target=_blank>www.redsox.com</A><BR>', mode 'r' 
  at 0x009C4650><BR> </DIV>
  <DIV>instead of giving me the ping stats "pinging etc etc, packets sent 4 
  recienved 4 etc)</DIV>
  <DIV> </DIV>
  <DIV>Any idea around this?<BR> </DIV></DIV><SPAN></SPAN><BR>
  <P><FONT size=2>--<BR>No virus found in this incoming message.<BR>Checked by 
  AVG Free Edition.<BR>Version: 7.1.385 / Virus Database: 268.4.1/312 - Release 
  Date: 4/14/2006<BR></FONT></P>
  <P><FONT face=Arial size=2></FONT></P></BLOCKQUOTE></BODY></HTML>
<BR>

<P><FONT SIZE=2>--<BR>
No virus found in this outgoing message.<BR>
Checked by AVG Free Edition.<BR>
Version: 7.1.385 / Virus Database: 268.4.1/312 - Release Date: 4/14/2006<BR>
</FONT> </P>