Hidden Password Input in Python

Поділитися
Вставка
  • Опубліковано 14 сер 2022
  • Today we learn how to code a hidden password input in Python.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/
  • Наука та технологія

КОМЕНТАРІ • 22

  • @pillo1934
    @pillo1934 Рік тому

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

  • @mikepenprogrammer2652
    @mikepenprogrammer2652 Рік тому

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

  • @Wallee580
    @Wallee580 Рік тому +7

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

  • @CodeHacker278
    @CodeHacker278 Рік тому

    Helpful video

  • @Sinke_100
    @Sinke_100 Рік тому

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

  • @abhayshandle
    @abhayshandle Рік тому

    Woooooh, lessss go

  • @kkyyllee4321
    @kkyyllee4321 Рік тому +8

    For anyone interested in an alternative, you can also import a module called stdiomask.
    import stdiomask
    passwd = stdiomask.getpass("password: ", '*')

    • @zFlow
      @zFlow Рік тому +1

      thanks a lot!

    • @rwurttem
      @rwurttem Рік тому +1

      I think that prefer the stdiomask method MUCH more. Sooo much easier (and less code)!

  • @fus3n
    @fus3n Рік тому +1

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

  • @tuanazzam5172
    @tuanazzam5172 Рік тому +2

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

  • @rycarr
    @rycarr Рік тому +2

    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()

  • @kurayamisenshi
    @kurayamisenshi Рік тому

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

  • @empty2701
    @empty2701 Рік тому

    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...

  • @muratahmetgenc6942
    @muratahmetgenc6942 Рік тому

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

    • @SageBetko
      @SageBetko Рік тому +2

      custom alias for neovim if i had to guess

    • @muratahmetgenc6942
      @muratahmetgenc6942 Рік тому +1

      @@SageBetko you got it. checked the screenshots, it is neovim. thanks!

  • @philtoa334
    @philtoa334 Рік тому

    Thx_.

  • @guilherme5094
    @guilherme5094 Рік тому

    👍

  • @user-yz1kx8zp2r
    @user-yz1kx8zp2r Рік тому

    +