On May 7, 2005, at 4:37 PM, Andre Nathan wrote: > Dunno about Windows but I think that using ruby-termios would be > better then calling an external program. > > I'm using something like this in ruby-managesieve's sievectl utility > (IIRC I just copied it from one of the usage examples in the termios > lib :) > > oldt = Termios.tcgetattr(STDIN) > newt = oldt.dup > newt.lflag &= ~Termios::ECHO > Termios.tcsetattr(STDIN, Termios::TCSANOW, newt) > print 'Password: ' > info['password'] = STDIN.gets > Termios.tcsetattr(STDIN, Termios::TCSANOW, oldt) I'm playing around with termios over here, to see if it's a viable replacement to the stty hack. I'm having some trouble getting what I need out of it though. The above code reads a line from the terminal. HighLine requires code to read a single character. Can someone please show me how to get that out of termios? Making this change will make HighLine depend on a C extension. Everyone agrees that's better than the external stty program? Thanks. James Edward Gray II