mirror of
https://github.com/Xevion/tcp-chat.git
synced 2025-12-06 05:16:45 -06:00
fix launch, adjust how main.py starts
This commit is contained in:
@@ -13,5 +13,6 @@ if __name__ == "__main__":
|
|||||||
app.setApplicationName("TCPChat Client")
|
app.setApplicationName("TCPChat Client")
|
||||||
m = MainWindow()
|
m = MainWindow()
|
||||||
app.exec_()
|
app.exec_()
|
||||||
elif str(sys.argv[1]).lower() == ['server', 's', '2']:
|
elif str(sys.argv[1]).lower() in ['server', 's', '2']:
|
||||||
from server import main
|
from server import main
|
||||||
|
main.receive()
|
||||||
|
|||||||
@@ -33,5 +33,5 @@ def receive():
|
|||||||
thread = threading.Thread(target=client.handle, name=client.id[:8])
|
thread = threading.Thread(target=client.handle, name=client.id[:8])
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
receive()
|
receive()
|
||||||
|
|||||||
Reference in New Issue
Block a user