Skip to content
← Back to Community
I need to replace the password with***** in this program
Profile icon
ROCKINGRAYQUAZA

is there a way to change password with astriek in python ,I have already used getpass but I think astriek would be better. any help??

Answered by CoolJames1610 [earned 5 cycles]
View Answer
Voters
Profile icon
ROCKINGRAYQUAZA
Comments
hotnewtop
Profile icon
CoolJames1610

Here is the solution:

import stdiomask p = stdiomask.getpass(prompt="Please enter your password: ")

use module stdiomask.
search as there are more things you can do
here is an example

Please mark the answer if this helped :)

Profile icon
ROCKINGRAYQUAZA
Profile icon
ROCKINGRAYQUAZA

why did u use prompt command [email protected]

Profile icon
CoolJames1610

prompt just means the question you ask them. @ROCKINGRAYQUAZA

Profile icon
Muffinlavania

@ROCKINGRAYQUAZA look at @CoolJames1610 , he has the answer

Profile icon
LiamBrooks1

How do you get the stdiomask to install, it will not work for me!

Profile icon
ROCKINGRAYQUAZA

Goto Packages, it will be a cube icon on the left bar click on it and install studiomask and getpas... @LiamBrooks1

Profile icon
SpaceFire

can you clarify the question? Do you mean printing the password with as asterisks? if so you can use a dictionary with the password as the key and the asterisks as the value.