suppress echo while reading input in expect

Hi all,

I tried searching for similar threads. Couldn't get any for Expect scripting.
I am trying automate a task which requires login to a machine. The user
would be prompted for the password. Now, I want this input to be hidden
from being displayed on the screen.

Is there any way, we can suppress echo to the terminal? Similar to the way
we do 'stty -echo' in shell script?

rgds,
Sudhir.

It's the same in Expect.

send_user "What is your password "
stty -echo
expect_user -re "(.*)\n" {set PASS $expect_out(1,string)}
send_user "\n"
stty echo

I've just started learning Expect myself, but I have used that piece of code successfully.