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 Jack.Andrews
Recipients Jack.Andrews, ajaksu2, draghuram, eric.araujo, hoffman, rickbking, ron_adam, terry.reedy
Date 2011-04-14.14:10:49
SpamBayes Score 2.3983425e-06
Marked as misclassified No
Message-id <1302790250.07.0.104560675642.issue2571@psf.upfronthosting.co.za>
In-reply-to
Content
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.py        2011-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
History
Date User Action Args
2011-04-14 14:10:50Jack.Andrewssetrecipients: + Jack.Andrews, terry.reedy, hoffman, draghuram, rickbking, ajaksu2, ron_adam, eric.araujo
2011-04-14 14:10:50Jack.Andrewssetmessageid: <1302790250.07.0.104560675642.issue2571@psf.upfronthosting.co.za>
2011-04-14 14:10:49Jack.Andrewslinkissue2571 messages
2011-04-14 14:10:49Jack.Andrewscreate