For practice and fun, I am working on a small Python chat client which connects to an online service. The chat allows the other users to see when the main user is typing. I'd like the other users to see when the program's user is in the process of entering something to send to them.
>>>Stranger: Hello, user.
>>>Hello, how are y...
This would perhaps set the variable hasSomethingEntered to True because something is being typed whereas
>>>Stranger: Hello, user.
>>>
would set the variable hasSomethingEntered to False because the user has not yet typed anything into the input box. This variable would then be passed into a separate thread which communicates with the server and lets it know that the client's user is typing.
Right now I am using Python's input command to get the user's chat entries. Is it possible to do what I wish to do using Python? If not, can you recommend an alternative way or language that I can use to accomplish the same goal?
I hope it is clear what I am trying to accomplish here and thank you in advance.