[issue2571] can cmd.py's API/docs for the use of an alternate stdin be improved?

2011-04-14 Thread Jack Andrews

Jack Andrews  added the comment:

hi guys,

this makes Cmd a bit more useful.

my use case is talking to pdb via pipe
(ie. subprocess module).  pdb doesn't 
behave very well if stdin is not a tty.


===
--- cmdpy.orig/cmd.py   2011-04-14 23:55:01.102867999 +1000
+++ cmdpy/cmd.py2011-04-14 23:55:16.272868002 +1000
@@ -92,6 +92,8 @@
 self.stdin = stdin
 else:
 self.stdin = sys.stdin
+if not stdin.isatty():
+self.use_rawinput = 0
 if stdout is not None:
 self.stdout = stdout

--
nosy: +Jack.Andrews

___
Python tracker 
<http://bugs.python.org/issue2571>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2571] can cmd.py's API/docs for the use of an alternate stdin be improved?

2011-04-14 Thread Jack Andrews

Jack Andrews  added the comment:

> Terry J. Reedy  added the comment:
>
> Jack, several questions.
> Are you saying that when stdin is a pipe and not a tty, pdb works better with 
> use_rawinput set False?

yes.  well, at least i thought so.  today, pdb works fine
with no patch.  i must have stumbled across my bug
in the middle of patching cmd.py.

if i notice anything strange, i'll let you know.

--

___
Python tracker 
<http://bugs.python.org/issue2571>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2571] can cmd.py's API/docs for the use of an alternate stdin be improved?

2014-06-27 Thread Jack Andrews

Jack Andrews added the comment:

I'm no longer working on this, but IIRC, my patch is not necessary and
there is no deficiency.

Ta, Jack

On Saturday, June 28, 2014, Mark Lawrence  wrote:

>
> Mark Lawrence added the comment:
>
> Does somebody want to propose a patch to take this forward, or can it be
> closed again, or what?
>
> --
> nosy: +BreamoreBoy
> versions: +Python 3.5 -Python 3.3
>
> ___
> Python tracker >
> <http://bugs.python.org/issue2571>
> ___
>

--

___
Python tracker 
<http://bugs.python.org/issue2571>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com