daniel hahler <[email protected]> added the comment:
It was added in 477c8d5e702 (a huge svn merge commit), with this reference:
r45955 | georg.brandl | 2006-05-10 19:13:20 +0200 (Wed, 10 May 2006) | 4
lines
Patch #721464: pdb.Pdb instances can now be given explicit stdin and
stdout arguments, making it possible to redirect input and output
for remote debugging.
I think a good alternative patch might be:
```diff
Lib/pdb.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git i/Lib/pdb.py w/Lib/pdb.py
index f5d33c27fc..daf49b3629 100755
--- i/Lib/pdb.py
+++ w/Lib/pdb.py
@@ -141,7 +141,9 @@ def __init__(self, completekey='tab', stdin=None,
stdout=None, skip=None,
nosigint=False, readrc=True):
bdb.Bdb.__init__(self, skip=skip)
cmd.Cmd.__init__(self, completekey, stdin, stdout)
- if stdout:
+ if stdout and stdout is not sys.stdout:
+ # stdout gets passed with do_debug for example, but should usually
+ # not disable using raw input then.
self.use_rawinput = 0
self.prompt = '(Pdb) '
self.aliases = {}
```
----------
versions: +Python 3.9
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31078>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com