If you're using the webapp framework, you should already be defining a subclass of RequestHandler that serves as a base class, with all your app's handlers extending that. You can simply override handle_exception, which serves as a global exception handler for any uncaught exceptions.
The default implementation calls self.error(500), logs the exception, and if debug is on, outputs a stacktrace.
If you're using another framework, you could write a piece of WSGI middleware that calls the wrapped WSGI app, and catches any thrown exceptions, dealing with them as you wish.