I'm trying to use getpass library in python but I can't. Can somebody help me to use it in vscode?
I tried:
Getpass import as input
but it didn't work.
I'm trying to use getpass library in python but I can't. Can somebody help me to use it in vscode?
I tried:
Getpass import as input
but it didn't work.
Use the correct Python syntax for importing the getpass module:
import getpass
We don't need to import the input function from a module because it is a built-in function in Python 3 versions.
There is no input
name in the getpass
library; you can find the docs here: https://docs.python.org/3/library/getpass.html
This is an example of usage:
import getpass
user = input("Username: ")
password = getpass.getpass("Password: ")
# do something with these credentials