diff options
author | Guido van Rossum <guido@python.org> | 1992-03-27 15:09:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-03-27 15:09:46 (GMT) |
commit | edbfcbd7ef4016b4b3c24af3ff652998a35717a3 (patch) | |
tree | 587284baccccedd25bad905a3ef79c94f99557c5 | |
parent | 35dcf454e1a4b1b67820f5f9480ef7af6f4ea382 (diff) | |
download | cpython-edbfcbd7ef4016b4b3c24af3ff652998a35717a3.zip cpython-edbfcbd7ef4016b4b3c24af3ff652998a35717a3.tar.gz cpython-edbfcbd7ef4016b4b3c24af3ff652998a35717a3.tar.bz2 |
use settrace() intreface
-rw-r--r-- | Lib/bdb.py | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -145,8 +145,7 @@ class Bdb: # Basic Debugger self.stopframe = self.botframe self.returnframe = None self.quitting = 1 - sys.trace = None - del sys.trace + sys.settrace(None) # Derived classes and clients can call the following functions # to manipulate breakpoints. These functions return an @@ -245,15 +244,14 @@ class Bdb: # Basic Debugger def runctx(self, cmd, globals, locals): self.reset() - sys.trace = self.trace_dispatch + sys.settrace(self.trace_dispatch) try: exec(cmd + '\n', globals, locals) except BdbQuit: pass finally: self.quitting = 1 - sys.trace = None - del sys.trace + sys.settrace(None) # XXX What to do if the command finishes normally? |