From: ajung at sz-sb.de (Andreas Jung)
Date: Sun, 4 Apr 1999 14:35:47 GMT
Subject: Python on Apache and traceback
In-Reply-To: <7e4bta$ild$1@paperboy.owt.com>; from kj7ny@email.com on Sat, Apr 03, 1999 at 12:05:16AM -0800
References: <7e4bta$ild$1@paperboy.owt.com>
Message-ID: <19990404163546.A3249@sz-sb.de>
Content-Length: 1344
X-UID: 40                                                  

On Sat, Apr 03, 1999 at 12:05:16AM -0800, kj7ny at email.com wrote:
> Before you flame my socks off, I know this is NOT the right place to
> probably ask this question, but I guarantee you there is no where better to
> get the right answer.
> 
> I am using Python on Apache on Win98.
> 
> Has anyone figured out how to get at the traceback errors when using Python
> on Apache? They are not automatically returned to the browser as they are on
> IIS and PWS.


Around your code with a try/except clause and catch the
traceback in the except clause. You can get the traceback
by using the traceback module. Logging can be achieved by
writing  the traceback to a file. 

I not sure if this is really neccessary because the traceback
of Python CGI scripts should be logged to the script or
error logfile of Apache.

Happy Easter,
Andreas

-- 
                                _\\|//_
                               (' O-O ')
------------------------------ooO-(_)-Ooo--------------------------------------
   Andreas Jung, Saarbr?cker Zeitung Verlag und Druckerei GmbH
   Saarbr?cker Daten-Innovations-Center
   Gutenbergstr. 11-23, D-66103 Saarbr?cken, Germany
   Phone: +49-(0)681-502-1528, Fax: +49-(0)681-502-1509
   Email: ajung at sz-sb.de (PGP key available)
-------------------------------------------------------------------------------




