1
votes
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?

1
That's not an error, it's a warning. How are you running this? - Wooble
I ran it on Python 2.7.6 32-bit and got no errors (through the interpreter) - wnnmaw
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. - Frozone
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". - Wooble
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? - Frozone

1 Answers

3
votes

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.