Sriram <sriramrathinav...@yahoo.com> added the comment:

Hi,

I believe this behaviour can be tested if we can prove that Cmd's cmdloop uses 
raw_input to get the data as against self.stdin.readline().

To test it, ideally I would have liked to override sys.stdin with a fake input 
stream and pass the list of args (like it's done in test_doctest.py). I can 
then pass the character codes for Up and Down Arrows in our fake stream and 
check if the raw_input can use readline and move through the fake input stream 
but that won't be possible because the C implementation of raw_input uses the 
readline functionality if only both stdin and stdout are from a terminal.

So alternatively, if we can just ensure that doctest's pdb 
(_OutputREdirectingPdb) has use_rawinput as 1, we can be assured that readline 
will be used.

I have attached the svn diff with trunk. Please review and comment

Thanks
Sriram

----------
Added file: http://bugs.python.org/file17109/pdbreadline.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to