21 lines
392 B
Batchfile
21 lines
392 B
Batchfile
@echo off
|
|
set VENV_DIR=.venv
|
|
|
|
if exist "%VENV_DIR%" (
|
|
echo Activating virtual environment...
|
|
call "%VENV_DIR%\Scripts\activate.bat"
|
|
)
|
|
|
|
echo Running Python script...
|
|
python main.py
|
|
|
|
if errorlevel 1 (
|
|
echo An error occurred. Press any key to exit.
|
|
pause >nul
|
|
)
|
|
|
|
if exist "%VENV_DIR%" (
|
|
echo Deactivating virtual environment...
|
|
call "%VENV_DIR%\Scripts\deactivate.bat"
|
|
)
|