annoying CL echo in interactive python / ipython

Jed Smith jed at jedsmith.org
Tue Oct 19 15:15:33 EDT 2010


On Tue, Oct 19, 2010 at 2:35 PM, kj <no.email at please.post> wrote:
> In <mailman.24.1287510296.2218.python-list at python.org> Jed Smith <jed at jedsmith.org> writes:
>
>>On Tue, Oct 19, 2010 at 1:37 PM, kj <no.email at please.post> wrote:
>
>>> % stty -echo
>
>>That doesn't do what you think it does.
>
> Gee, thanks.  That really helped.  I'll go talk to my guru now,
> and meditate over this.

You're right, I could have been more clear. I was nudging you to go
read the man page of stty(1), but since you won't and want to get
snarky instead, I will for you:

>     echo (-echo)
>                 Echo back (do not echo back) every character typed.

I'm going to guess that the percent sign in your prompt indicates that
you're using zsh(1).  With my minimally-customized zsh, the echo
option is reset every time the prompt is displayed. That means you can
type "stty -echo", push CR, the echo option is cleared, then zsh
immediately sets it before you get to type again. Therefore, you
cannot observe its *actual* behavior, and you assumed it had something
to do with what you're after. Am I on the right track?

Start bash, run stty -echo, then type. That is the ACTUAL behavior of
that option.

As to your original issue, your readline configuration is most likely
the problem. I consider it very unlikely that Python has anything to
do with it. I have no idea why fiddling with your terminal affects
readline, but there is a lot that I do not understand about readline.

-- 
Jed Smith
jed at jedsmith.org



More information about the Python-list mailing list