From fa78d0fbe45a7f16d5d30c3d4e3ad30dc4933e8f Mon Sep 17 00:00:00 2001 From: Ka-Ping Yee Date: Tue, 4 Dec 2001 18:45:17 +0000 Subject: [PATCH] Add "file" argument to Hook constructor. By default, save sys.stdout in self.file when a Hook instance is created (e.g. when cgitb.enable() is called). --- Lib/cgitb.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Lib/cgitb.py b/Lib/cgitb.py index e9b03769151..619bdfc25a1 100644 --- a/Lib/cgitb.py +++ b/Lib/cgitb.py @@ -19,6 +19,8 @@ tuple (etype, evalue, etb) just like the value of sys.exc_info().""" __author__ = 'Ka-Ping Yee' __version__ = '$Revision$' +import sys + def reset(): """Return a string that resets the CGI and browser to a known state.""" return '''