learning python, using string help
mikeisgreat at gmail.com
mikeisgreat at gmail.com
Thu Feb 2 14:41:36 EST 2006
Well, I did want to add some formatting for example
STATUS = "up"
getrup = os.popen('ruptime').read()
show = getrup.splitlines()
gethost = show[0]
hostname = gethost.split()
print hostname[0]
getstatus = hostname[1]
if getstatus.find("STATUS"):
print STATUS
else:
print "<font color='RED'>HOST DOWN</font>"
I think that will convey what I am attempting.
I know that is sloppy, but I am learning ..
Thanks for your patience.
More information about the Python-list
mailing list