PDA

View Full Version : Problem with Terminal. Can't see typed text




toastyred
Nov 4, 2009, 11:06 AM
Hi I'm having a problem with Terminal after I run a python script interactively. After I quit python interactive, I can no longer see what I am typing in terminal. If I type blindly and press enter, whatever command I use works. I can fix this by typing 'stty sane', but this is annoying to have to do after every time I quit python.

Any ideas on how to fix this?

I'm using 10.5.8 and python version 2.6.2



chown33
Nov 4, 2009, 12:15 PM
After running any python script, or only after running a particular script?

The former suggests python is broken or misconfigured in some way. You don't have a non-standard python version installed, do you?

The latter suggests the script is setting one of its terminal streams to an unconventional state, and then failing to restore it on exit. That would be a bug in the script.

toastyred
Nov 5, 2009, 08:43 AM
After running any python script, or only after running a particular script?

The former suggests python is broken or misconfigured in some way. You don't have a non-standard python version installed, do you?

The latter suggests the script is setting one of its terminal streams to an unconventional state, and then failing to restore it on exit. That would be a bug in the script.


Hi, thanks for the help. I made a new test script which just printed something and found where the problem is coming from.
I need to use a module ROOT in my scripts and when I don't include it the problem doesn't happen. I'll move my problem to a ROOT experts forum! Thanks again, you put me on the right track as I wasn't sure if it was python or my terminal settings that was the problem!

chown33
Nov 5, 2009, 11:48 AM
As a guess, anything that requests a password from the tty will turn off tty echo during password input. If it fails to restore the tty to its prior state, then echo will still be disabled, and you won't see anything typed in.