I'm looking for a good way to hide input entered for a chat-like system on WIndows
For now, i wrote this
import sys
name = input("Enter your message: ")
sys.stdout.write('\r')
print(message)
But it doesn't do anything.
I'd like to do something like this
Enter your message: Hello
Output:
Hello
That is way better then
Enter your message: Hello
Output:
Enter your message: Hello
Hello
So the final output, after some messages will be
Hello
How are you?
I'm fine thanks.
And not
Enter your message: Hello
Hello
Enter your message: How are you?
How are you?
Enter your message: I'm fine thanks.
I'm fine thanks.
I've seen some questions like mine before asking but i didn't find anything working, i also can't use os
because it has to contain more inputs, i also tried using \r
but (as i used it) doesn't do what i want it to do, thanks in advance.