This PIP package is close to perfect (asterix password)

I downloaded this pip package and it does exactly what I want except it gives me a default string output of “Password:”

I dont want it to say anything. I only want my text to be hidden by asterix when im typing in letters when outputting in the terminal.

for example I want my code to say:
password = input(“Create password”) # notice how password is lowercase.

output gives me:
Create password: # here i type in a password (letters showing)

now for the PiP package example:
password = stdiomask.getpass()

output gives me:
Password: # here i can type in whatever i want and the pip package covers my characters in asterix…BUT…the “Password:” text with its colon is default and notice how the ‘P’ in Password is capitalized too. thats default as well.

Does anyone know how to still use the package but have the word “Create” behind “Password:” ? I tried doing password = “Create” + stdiomask.getpass() ### but then realized that would just add the word “Create” to whatever password i want to have.

Or maybe someone has an idea on how i can get the default “P” in Password to be lowercase? stdiomask.getpass().lower wont work obviously because that will just turn the password into lower case and not the “P” in the “Password:” default text that comes with the PiP stdiomask package.

this is bugging the hell out of me. please help if you can!

Have you looked at the documentation for this module? PyPi and github page of this module have couple examples, which might answer your question.

1 Like

@deboer753 I think this might be what you want instead:


Stdio Mask


No more updates will be made to this module. Please switch to pwinput instead.

You’ll need to change import stdiomask to import pwinput and stdiomask.getpass() to pwinput.pwinput() .

Both stdiomask and pwinput allow you to customize the prompt, which I think is what you are trying to do.

It can definitely be done, I just tried it by reading docs. I changed the prompt and the mask:

I think the issue is that you are using it incorrectly. These are both functions which can take 2 arguments prompt=, and mask=

Look at the example usage for each they are basically the same:

stdiomask: stdiomask.getpass()

pwinput: pwinput.pwinput()

1 Like