Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

toastyred

macrumors newbie
Original poster
Nov 4, 2009
3
0
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

Moderator
Staff member
Aug 9, 2009
10,739
8,410
A sea of green
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

macrumors newbie
Original poster
Nov 4, 2009
3
0
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

Moderator
Staff member
Aug 9, 2009
10,739
8,410
A sea of green
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.