-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.cmd
More file actions
51 lines (44 loc) · 1.21 KB
/
Copy pathdebug.cmd
File metadata and controls
51 lines (44 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@echo off
setlocal enabledelayedexpansion
::set PATH=.\input
:: Title
title Python Version Check
:: Clear screen and display header
cls
echo.
echo ================================
echo PYTHON VERSION CHECKER
echo ================================
echo.
:: Check if Python is available
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Python is not installed or not in PATH
echo.
echo Please install Python 3.x from:
echo https://www.python.org/downloads/
echo.
echo Make sure to check 'Add Python to PATH' during installation!
echo.
pause
exit /b 1
)
:: Get Python version
for /f "tokens=2" %%i in ('python --version 2^>^&1') do set "pyversion=%%i"
echo Detected Python version: !pyversion!
:: Check if it's Python 3.x
for /f "tokens=1 delims=." %%a in ("!pyversion!") do set "major=%%a"
for /f "tokens=2 delims=." %%b in ("!pyversion!") do set "minor=%%b"
if "!major!" neq "3" (
echo ERROR: Python 3.x is required but found version !pyversion!
echo.
echo Please install Python 3.x from:
echo https://www.python.org/downloads/
echo.
pause
exit /b 1
)
:: Run the Python script
echo Starting your Python script...
@start "" python aica_encoder.py
exit /b 0