added check to see if code is running on python 3.11

This commit is contained in:
Seth Samuel 2024-11-14 21:09:56 +13:00
parent c42864e46d
commit 2d42f090dd

View file

@ -4,9 +4,15 @@ import struct
import serial import serial
import time import time
import platform import platform
import sys
from enum import Enum from enum import Enum
from GAME_METHODS import * from GAME_METHODS import *
##check if python 3.11 is running code and exit if not
if not(sys.version_info[0] == 3 and sys.version_info[1] == 11):
raise Exception("code must be run in python verion 3.11.\ninput struct for network needs to be changed per python version.")
runningOs = platform.system() runningOs = platform.system()
UDP_IP = "127.0.0.1" UDP_IP = "127.0.0.1"