executable "wrapper" gui -- advice sought

Grant Goodyear g2boojum at hotmail.com
Sun Apr 23 13:57:53 EDT 2000


My thanks to those who replied.  I'm using linux (mandrake 7 to be
specific), and this seemed to work reasonably well:

#!/usr/bin/env python
# htmlout.py

from popen2 import Popen3

cmd = "./a.out"
htmlfile = "/home/grant/public_html/test.html"
htmlout = open(htmlfile, 'w')
htmlout.write("<pre>\n") #hack so that I don't have to format the html

process = Popen3(cmd)
stdout = process.fromchild
print stdout
while (process.poll() == -1):  #while still running
    line = stdout.readline()
    if (line):
        htmlout.write(line)
        htmlout.flush()






More information about the Python-list mailing list