learning python, using string help

mikeisgreat at gmail.com mikeisgreat at gmail.com
Thu Feb 2 13:47:42 EST 2006


hi all,

I have a simple snippet I am trying to keep the format the same as
plain text, though I want to embed it in html ...

basically,

print "Content-type:text/plain\n\n";
getrup = os.popen('ruptime').read()
print getrup

is the same format as if I ran 'ruptime' from the command line.

If I use...

print "Content-type:text/html\n\n";
getrup = os.popen('ruptime').read()
print getrup

I can just split the lines and loop through it ... but I am not sure
how to keep the tab spacing the same
I'm sure its something so simple I am missing ....

thanks for helping someone learning..
--mike




More information about the Python-list mailing list