How to hide user input in Python

preview_player
Показать описание
How to hide user input in Python with the getpass method.

📓 ML Notebooks available on Patreon:

If you enjoyed this video, please subscribe to the channel:

~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

#Python #shorts
Рекомендации по теме
Комментарии
Автор

How to make facebook in python:
from meta import facebook
facebook()

abddulrahmanas
Автор

SIMPLE PYTHON TIP:
Copy and paste an entire project and press run! It's as easy as cease and desist.

Gizzardx
Автор

One great usage for getpass I use all the time:
Let's say you have a console application and want to tell the user you have executed a command. You could just wait for a few seconds with the sleep function, but everything the user types will be carried over to the next input you request from them. This can lead to some heavy bugs.
Instead I use getpass("Press ENTER to continue.") and no matter what the user types it doesn't show an input and pressing enter will just end the function.

Finkelfunk
Автор

How to do something in python: use somebody's code to do it for you

AvenDonn
Автор

There are various Python modules that are used to hide the user's inputted password, among them one is maskpass() module. In Python with the help of maskpass() module and base64() module we can hide the password of users with asterisk(*) during input time and then with the help of base64() module it can be encrypted.

sachinbhujel
Автор

My issue with Python and it's community is the over reliance on Libraries... "simple trick", the trick being adding more dependencies... this is a prime example for it.

Shine
Автор

It is better to make estimation indication that you are typing characters using star * or # hashtag instead of invisible characters

Like when you download you can see the estimated time to completion

mohammedissam
Автор

To those criticizing, there is nothing wrong about using packages or pre-implemented functionalities, so long as you know how they work under the hood

allantourin
Автор

Why are people complaining that he's using a library? If the function you need already exists in a library, why not use it?

joll
Автор

Great tip. But what if instead of blank you want to show "*" as a form of feedback to the user how many keys they had typed (some users may also think the program hangs)? Is there an option in getpass() to allow this?

ReynoldChua
Автор

hello. Would you recommend vscode for a python beginner over pycharm?

skxjenje
Автор

That is pretty neat. I can't yet imagine an application since I use a flask front end but it's a good tip nonetheless.

deemon
Автор

What is the platform name on which you are Coding?

Jimil_soni
Автор

Omfgg just import this library and use this function wtf 😄 🤣

ttrss
Автор

what terminal do you use in your video?

dmitrykozachenko
Автор

Can it be done with a replace function?

PeterStoyanov-Pepe
Автор

This would be useful in an HTML5 upgrade, whose password type is easy to edit out.

gedalyahreback
Автор

Hi sir may I know what app are you using to program in python?

ACAO
Автор

How to get Dad back from buying milk:
from store import Dad
Dad()

Congratulations now you got your dad back!

yaannn
Автор

Wouldn't be better to change password output to * rather then nothing?

lukaschumchal