From 2d42f090dd5a43e4a9b76621122a7b44e2d868c5 Mon Sep 17 00:00:00 2001 From: Seth Date: Thu, 14 Nov 2024 21:09:56 +1300 Subject: [PATCH] added check to see if code is running on python 3.11 --- OutGaugeInterpreter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OutGaugeInterpreter.py b/OutGaugeInterpreter.py index 69e5cd1..2393f38 100644 --- a/OutGaugeInterpreter.py +++ b/OutGaugeInterpreter.py @@ -4,9 +4,15 @@ import struct import serial import time import platform +import sys from enum import Enum 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() UDP_IP = "127.0.0.1"