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. > traceback.print_exc(file=file) > print "<pre>" > print cgi.escape(file.getvalue()) > print "</pre>" > > > I haven't got access to error logs so I can't look at it that way. > > </F> -- http://mail.python.org/mailman/listinfo/python-list