[Tutor] Help with ping...

johnathon hornbeck jyoyoguy69@msn.com
Tue Nov 12 12:22:02 2002


I want to write something that would just take a url and ping it. Here is 
the code that I have.

#!/usr/bin/python

import os

url = raw_input("Please enter the address you would like to ping:")

print "now pinging %s\n" % url

os.system("ping %s") % url #note I have tried this many different ways so I 
know
                           #the syntax is wrong

John Hornbeck
Linux Instructor, Great Plains Technology Center
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GAT d? s++:- a-- C++++ UL++++ P+ L+++ E---- W+++ N- o-- K- w---
O- M-- V PS+++ PE-- Y+ PGP- t+++ 5-- X-- R+++ tv+ b++++ DI+++++ D++++
G e* h--- r+++ y++++
------END GEEK CODE BLOCK------






_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail