fix launch, adjust how main.py starts

This commit is contained in:
Xevion
2021-01-10 12:40:07 -06:00
parent 065a4dc313
commit b517d9d775
2 changed files with 4 additions and 3 deletions

View File

@@ -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()

View File

@@ -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()