Q:

input hidden string via sys.argv in python

I need to input the password via the command line and use it in the program via sys.argv[2].
The problem with CLI is that the password is displayed in clear text.
Below is the code :
import sys
user_args = sys.argv[1:]
username, password = user_args

print username
print password

Take a look : 

A:

You can use the getpass module (https://docs.python.org/3.5/library/getpass.html)
import getpass
password = getpass.getpass('Enter password: ')

