#๐ 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
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.
and when i press enter then the next input shows
you can't have multiple inputs on the terminal at the same time, you need to do one at a time after each other
okay
and you need to put the letters in-between quotes
do as you did on line 8 on line 12 and 16 as well
ye
@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
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)...
@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
ye, i tried to do that but didn't work
okay, the terminal you are using might now allow for that then
i couldn't type anything
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
oh yes it prints that what im typing but it dosen't show it on the screen
like on ball or something
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
okay thanks!
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
you're welcome ๐
next version might be using tkinter or something else for a GUI instead ๐
Ye, i saw that tkinter thing and it looked good, but im just starting on python.
good luck and have fun learning python ๐
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.