File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 26
26
import argparse
27
27
import os
28
28
import platform
29
+ import sys
29
30
30
31
from pathlib import Path
31
32
35
36
from textual .widgets import Button , Header , Label
36
37
except ImportError :
37
38
print ("Please install the \" textual-dev\" package before running this script." )
38
- quit ()
39
+ quit (1 )
39
40
40
41
from settings import SettingsScreen
41
42
from editor import EditorScreen
@@ -96,6 +97,7 @@ def on_mount(self) -> None:
96
97
# Event handler called when the app is mounted for the first time
97
98
self .title = "Configurator"
98
99
self .sub_title = "Main Menu"
100
+ print ("Using Python version: " + sys .version )
99
101
print ("App started. Initial Options:" )
100
102
print ("Root path: " + self .ROOT_PATH )
101
103
print ("Script path: " + self .SCRIPT_PATH )
@@ -119,6 +121,11 @@ def main() -> None:
119
121
# Set the PYTHONUNBUFFERED environment variable to "1" to disable the output buffering
120
122
os .environ ['PYTHONUNBUFFERED' ] = "1"
121
123
124
+ # Check Python version
125
+ if sys .version_info < (3 , 9 ):
126
+ print ("This script requires Python 3.9 or later" )
127
+ quit (1 )
128
+
122
129
app = ConfigEditorApp ()
123
130
124
131
parser = argparse .ArgumentParser (description = "Configure and compile the ESP32 Arduino static libraries" )
You can’t perform that action at this time.
0 commit comments