Ticket #3289: really-minimal.py

File really-minimal.py, 373 bytes (added by glyph, 6 years ago)

A really minimal example, which doesn't involve twistd, and just shows you the full 'maximum recursion depth exceeded' traceback.

Line 
1
2import sys
3from twisted.python.log import startLogging, msg, addObserver
4from twisted.python import failure
5failure.traceupLength = 0
6
7realstdout = sys.stdout
8def showError(eventDict):
9    if eventDict['isError']:
10        realstdout.write(eventDict['failure'].getTraceback())
11addObserver(showError)
12
13startLogging(sys.stdout)
14startLogging(sys.stdout)
15
16msg("Hello, World!")