GetPass () repeats password in Eclipse

Hey, everyone just started doing little Python to help with a few scripts at work, but I seem to be fixated on a little problem.

I am using Eclipse with pydev for my development platform and developing against python 2.7.3. I'm just trying to ask the user for a password using:

password = getpass.getpass() 

This line works as expected when running at the terminal / command prompt, however, when I launch the Eclipse console, user input is not hidden as it should be. Any ideas how to fix this?

+4
source share
1 answer

This is documented behavior - some terminals are not capable of echoing, in which case a warning should be given instead:

If no echo entry is not available, getpass () returns to printing a warning message for stream and reading from sys.stdin and issuing GetPassWarning.

From the docs for getpass.getpass() .

+3
source

All Articles