Clear input text after user has typed it
This commit is contained in:
parent
702432c92a
commit
ccf5142121
2 changed files with 6 additions and 4 deletions
|
@ -37,10 +37,11 @@ class client():
|
|||
receiving.daemon = True
|
||||
receiving.start()
|
||||
while True:
|
||||
msg = input()
|
||||
msg = f"\nClient: {msg}\n"
|
||||
print(msg)
|
||||
self.sMsg(msg)
|
||||
msg = input()
|
||||
print('\033[1A' + '\033[K', end='')
|
||||
msg = f"\nClient: {msg}\n"
|
||||
print(msg)
|
||||
self.sMsg(msg)
|
||||
|
||||
if __name__ == '__main__':
|
||||
check_call('clear')
|
||||
|
|
|
@ -37,6 +37,7 @@ class Server:
|
|||
self.receiving.start()
|
||||
while True:
|
||||
msg = input()
|
||||
print('\033[1A' + '\033[K', end='')
|
||||
msg = f"\nADMIN: {msg}\n"
|
||||
print(msg)
|
||||
self.client.send(self.f.encrypt(msg.encode()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue