1
import getpass    
password=getpass.getpass(prompt="Password: ")
print(password)

This really simple code displays the error:

Warning (from warnings module):
  File "C:\Python33\lib\getpass.py", line 92
    return fallback_getpass(prompt, stream)
GetPassWarning: Can not control echo on the terminal.
Warning: Password input may be echoed.
Password: 

It does work as an input but the prompt isn't working. Running python 33 64-bit, anyone know whats happening?

6
  • That's not an error, it's a warning. How are you running this? Commented Jan 21, 2014 at 17:12
  • I ran it on Python 2.7.6 32-bit and got no errors (through the interpreter) Commented Jan 21, 2014 at 17:13
  • Running through python IDLE, using version 3.3 might be my problem. I know it's a warning, but the prompt that I put in doesn't even register, that's what I'm wondering how to fix. Commented Jan 21, 2014 at 17:17
  • 1
    What do you mean by "works as an input but prompt isn't working"? The bit you pasted above shows the prompt "Password:" just fine. The way to fix the actual warning is probably "don't use IDLE, it's awful". Commented Jan 21, 2014 at 17:20
  • Ah yea sorry, you're right. What is wrong with IDLE? Are there any alternatives you recommend that you can run the code in the program? Commented Jan 21, 2014 at 17:24

1 Answer 1

3

Try running it on cmd.exe or windows PowerShell, instead of IDLE's.

i.e

> python myscript.py

Assuming you have the python executable on your path, and you're in the current directory of myscript.py.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.