Home > database >  use getpass in visual studio code
use getpass in visual studio code

Time:05-16

I am using this code:

import getpass

pwd = getpass.getpass(prompt = 'Please enter password:')

Unfortunatley I cannot enter anything in the terminal. Am I missing something?

CodePudding user response:

The principle of this function is that you can enter text as in a classic input but it is not displayed on the screen. If you try to add print(pwd) and hit some keys at the time of input, it should return exactly what you typed

  • Related