[Twisted-Python] Re: example stdin handling client that supports readline?
andrew at ellerton.net
Tue May 25 02:26:43 EDT 2004
On Mon, 24 May 2004 13:13:32 +0100, Michael Hudson <mwh at python.net> wrote:
> Christopher Armstrong <radix at twistedmatrix.com> writes:
>> Michael Hudson wrote:
>>> Andrew Bennetts <andrew-twisted at puzzling.org> writes:
>> -- output there seems to do some weird stuff with whitespace, but
>> anyway, this is pretty cool :-)
> Well, yeah, you're writing to the terminal when it's in raw mode.
> pyrepl gets upset (cosmetically) when you do that. Tracebacks are
> really, really ugly...
Thanks to all for their replies!
I've got some great options to try now.
It also confirmed that the readline library is usually (always?) invoked in a blocking way, and that a char-by-char alternative approach is needed and even mostly done!
I figured that shells like bash somehow use readline while allowing input to flow in from other sources (eg pipes in the background etc), and without looking at the bash source I figured it would be doing this with select, not multiple threads.
Many thanks everyone, I really appreciated all your comments!
More information about the Twisted-Python