The standard way to enter a password in Python without echoing it is using getpass.getpass().
However,it doesn't support clipboard input (ctrl-V), which is needed when dealing with complex, highly secure passwords.
Has anyone ever come up with a workaround (get the password silently from crtl-V)?
Thanks!
R.
It is possible to right click paste from clipboard into the command prompt as an alternative.
Unfortunately getpass.getpass()
uses getwch()
from Windows C, which does not allow CTRL+C
to be read.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.