From e3e6a3f2c422a6b82b234f575a6b3bad459e5e0b Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 22 Jan 2014 09:31:30 +0100 Subject: add window management, move hacky Python client over to PyQt5 --- python_client.py | 206 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 168 insertions(+), 38 deletions(-) (limited to 'python_client.py') diff --git a/python_client.py b/python_client.py index 24c8a3e..88ac307 100644 --- a/python_client.py +++ b/python_client.py @@ -1,4 +1,9 @@ -import socket, ssl, threading, struct +# Yes, this source code is terrible. +# It's just something I've put together to test the server +# before I write a *real* client. + +import sys, socket, ssl, threading, struct +from PyQt5 import QtCore, QtGui, QtWidgets protocolVer = 1 sock = None @@ -9,6 +14,8 @@ lastReceivedPacketID = 0 packetCache = [] packetLock = threading.Lock() +u32 = struct.Struct('