This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sriram
Recipients sriram, wosc
Date 2009-12-27.18:33:36
SpamBayes Score 4.08889e-09
Marked as misclassified No
Message-id <>

This is the first bug am working in python, kindly excuse my mistakes, 
if any.

As far as I can understand, the pdb disabled readline when an explicit 
stdin or stdout is passed, to allow remote debugging.

I found this in Python 2.5.4 Release log. 
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.

Now in since we pass the stdout argument (which is always 
sys.stdout) to, readline is always disabled when pdb is invoked 

One fix I can think of is to have pdb disable use of readline, not if 
any output stream is passed but only if a output stream other than 
sys.stdout is passed. I infact believe, this will preserve the 
functionality of that existed before release of version 2.5.4

The above fix would still not solve the problem because before we pass 
the output stream to, we override sys.stdout in doctest to 
doctest's spoofout. So in, sys.stdout will not point to real 
sys.stdout. This can be fixed by overriding sys.stdout after we 
initialize the debugger.

Please find the patch for doctest and pdb as an attachment. 

Date User Action Args
2009-12-27 18:33:39sriramsetrecipients: + sriram, wosc
2009-12-27 18:33:38sriramsetmessageid: <>
2009-12-27 18:33:37sriramlinkissue5727 messages
2009-12-27 18:33:36sriramcreate