1 """twit - The Window-Independent Tracer.
4 twit.main() Enter debugger in inactive interactive state
5 twit.run(stmt, globals, locals) Enter debugger and start running stmt
6 twit.post_mortem(traceback) Enter debugger in post-mortem mode on traceback
7 twit.pm() Enter debugger in pm-mode on sys.last_traceback
9 main program: nothing but a bit of glue to put it all together.
11 Jack Jansen, CWI, August 1996."""
16 # Add our directory to path, if needed
17 dirname
= os
.path
.split(__file__
)[0]
18 if not dirname
in sys
.path
:
19 sys
.path
.append(dirname
)
23 MacOS
.splash(502) # Try to show the splash screen
24 import mactwit_app
; twit_app
= mactwit_app
32 import tktwit_app
; twit_app
= tktwit_app
34 print 'Please implementent machine-dependent code and try again:-)'
43 twit_app
.Twit('none', None)
45 def run(statement
, globals=None, locals=None):
47 twit_app
.Twit('run', (statement
, globals, locals))
51 twit_app
.Twit('pm', t
)
54 post_mortem(sys
.last_traceback
)
56 if __name__
== '__main__':