#๐Ÿ”’ I want all inputs to be at the same time and now it's only newPassword input.

34 messages ยท Page 1 of 1 (latest)

azure leaf
wild driftBOT
#

@azure leaf

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

azure leaf
#

and when i press enter then the next input shows

gentle urchin
# azure leaf

you can't have multiple inputs on the terminal at the same time, you need to do one at a time after each other

azure leaf
#

okay

gentle urchin
#

and you need to put the letters in-between quotes

#

do as you did on line 8 on line 12 and 16 as well

azure leaf
#

ye

gentle urchin
#

@azure leaf if you want a more advanced user interface you would need to look into using curses that comes as part of the python standard library (nothing more to install) or use a high level abstraction that is easier to develop with such as textual, but that needs to be installed as an additional package/module/library if you want to use it

#

you can also get some fancy colors and such using packages such as rich if you install that as well

#

!d getpass.getpass

wild driftBOT
#

getpass.getpass(prompt='Password: ', stream=None)```
Prompt the user for a password without echoing. The user is prompted using the string *prompt*, which defaults to `'Password: '`. On Unix, the prompt is written to the file-like object *stream* using the replace error handler if needed. *stream* defaults to the controlling terminal (`/dev/tty`) or if that is unavailable to `sys.stderr` (this argument is ignored on Windows).

If echo free input is unavailable getpass() falls back to printing a warning message to *stream* and reading from `sys.stdin` and issuing a [`GetPassWarning`](https://docs.python.org/3/library/getpass.html#getpass.GetPassWarning)...
gentle urchin
#

@azure leaf ๐Ÿ‘† this might be of interest for you if you don't want the password to show up on the console when they type it in

azure leaf
gentle urchin
#

okay, the terminal you are using might now allow for that then

azure leaf
#

i couldn't type anything

gentle urchin
#

it just looks like you aren't typing anything, but you should get the input into a variable when you press enter

#

try to print the variable after the getpass prompt and you'll see if it's empty or if the password is stored in there

#

it should work in most environments unless you are using a really strange terminal

azure leaf
#

oh yes it prints that what im typing but it dosen't show it on the screen

#

like on ball or something

gentle urchin
#

that is the intended function of getpass it shouldn't echo the password input on the screen, so that no one seeing your screen sees your password

#

it doesn't print anything other then the prompt

azure leaf
#

okay thanks!

gentle urchin
#

so, sounds like it works as intended in your environment then ๐Ÿ‘
but if you don't like that you can always use input() instead, but risk exposing your passwords when you type them in

azure leaf
#

No, i like that getpass thing it's good!

#

Im gonna use it

#

Thank you for helping me!

gentle urchin
#

next version might be using tkinter or something else for a GUI instead ๐Ÿ˜‰

azure leaf
#

Ye, i saw that tkinter thing and it looked good, but im just starting on python.

gentle urchin
wild driftBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.