Hidden Password Input in Python

preview_player
Показать описание
Today we learn how to code a hidden password input in Python.

◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚

🌐 Social Media & Contact 🌐

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

The reason you needed to type something before the password prompt would appear is you forgot to add flush=True in the print statement

Wallee
Автор

Sweet. Another video that can come in handy in the future.

mikepenprogrammer
Автор

For anyone interested in an alternative, you can also import a module called stdiomask.

import stdiomask

passwd = stdiomask.getpass("password: ", '*')

kkyyllee
Автор

Love your videos and your attitude, thanks for this!!

pillo
Автор

8:09 to fix that i think you need to flush after printing the message

fusn
Автор

In C++ when intercepting characters we needed to flush the buffer. Because it would catch the end line input from your username input. That’s probably what’s holding up your Python code as well.

We’d handle it using getch.ignore()

rycarr
Автор

I tryed myself, i didn't know about flush in print function, works fine if you put flush in first print too

Sinke_
Автор

Nope, pip install getch is not working for python 3.9. Maybe it's too old.

tuanazzam
Автор

what is nv? looks like a text editor but I couldn't find anything the net.

muratahmetgenc
Автор

This is my error when importing getch. -> Import "getch" could not be resolved

kurayamisenshi
Автор

Bro, can you please make a tutorial someday teaching how to make a chatbot that makes his own answers? I'm really interested in this kinda of stuff but didn't find helpful content, everything i found easily crashes my computer...

empty
visit shbcf.ru