+ 11

How to get password input from user in asetrick from like this (******)

Python coding

23rd Apr 2018, 8:33 AM
Ratnapal Shende
Ratnapal Shende - avatar
4 odpowiedzi
+ 1
That isn't possible in soloearn I guess. But you can get password from the user by using python's built-in module getpass. Here's how it's done(note that instead of displaying '*'s it will display nothing, so password isn't actually visible while the user types it in): #importing getpass from getpass import getpass #password input prompt password = getpass("Password: ")
23rd Apr 2018, 9:35 AM
Danigamy
Danigamy - avatar
+ 10
But when I type password nothing is display it is nice.. But I want in asetrick from ******** Like Facebook password...
23rd Apr 2018, 9:54 AM
Ratnapal Shende
Ratnapal Shende - avatar
+ 3
Sorry I just found that you can do it. But that's way far from my understanding.
23rd Apr 2018, 10:02 AM
Danigamy
Danigamy - avatar
0
As far as I know you can't do that in shell. But you surely can do if you are making a GUI program.
23rd Apr 2018, 9:58 AM
Danigamy
Danigamy - avatar