[...]M.E.Farmer wrote:
I found an excellent example that was posted by the F-bot.
[...]
try: import myscript myscript.main() except: print "Content-Type:", "text/html" print file = StringIO.StringIO()
Note: it's usually a very bad idea to name -anything- "file" unless you intentionally want to clobber the name of the built-in file object.
In fairness to the effbot I feel duty bound to suggest that the example may have been produced before file() was a built-in function. The effbot is usually reiable on programming matters.
regards Steve -- Steve Holden +1 703 861 4237 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Python Web Programming http://pydish.holdenweb.com/
-- http://mail.python.org/mailman/listinfo/python-list