[Tutor] pstree cgi-script
flaxeater at yahoo.com
Tue Jun 15 23:20:29 EDT 2004
--- Conrad Gavin <gubbs at fudo.org> wrote:
> Hi there.
> I'm trying to write a simple little cgi-script that executes pstree
> echos/prints the output to the webpage ..
> Clearly I am doing it wrong, as it will not work.
> Here's my code:
> import os
> cmd = "pstree"
> status = os.system(cmd)
> print "Status:", status
Ok this is an easy one. I also had this problem at first with cgi.
you need to put
in this case at the begining of the script this tells apache to tell
the browser whats going on. Otherwise apache croaks. If you
outputing html then type
The two caraiage returns are important. There you go good luck
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
More information about the Tutor