A fun and visually dynamic Python Tkinter application that simulates a system warning screen with flashing borders, progress effects, speech, and sound.
Created by Md Anayet Hossen as a learning and demonstration project for Tkinter UI, threading, and audio handling in Python.
- Fullscreen GUI with animated flashing border
- Color-changing warning icon (rainbow cycle)
- Real-time progress simulation with emoji
- Voice announcements using
pyttsx3 - Beep sound effects using
winsound - Multithreaded design for smooth animation
- Safe exit shortcut (
Ctrl + 0)
This project demonstrates:
- Tkinter GUI layout & styling
- Python multithreading
- Sound handling in Windows
- Text-to-speech integration
- Event binding and UI control
This app is for educational and entertainment purposes only.
It does not actually hack, copy, or access any real data.
Please use responsibly and do not distribute it to mislead others.
Install dependencies before running:
pip install pyttsx3(winsound is built-in on Windows)
- Download or clone this repository
- Open a terminal in the project directory
- Run the script:
python "System-Warning.py"- To safely exit the demo, press:
Ctrl + 0
Nice — converting a Python script into a Windows .exe is straightforward.
The most common tool is PyInstaller.
Below are concise, copy-pasteable commands for both Command Prompt (cmd) and PowerShell, plus helpful tips and common gotchas.
- Open cmd or PowerShell.
- (Optional but recommended) Create & activate a virtual environment.
- Install PyInstaller:
pip install pyinstaller
- Build the
.exewith PyInstaller. - Find your executable inside the
dist\folder.
Assume your script is System-Warning.py.
python -m pip install --upgrade pip
python -m pip install pyinstaller
python -m PyInstaller --onefile "System-Warning.py"python -m pip install --upgrade pip
python -m pip install pyinstaller
python -m PyInstaller --onefile "System-Warning.py"After this, the executable will be at:
dist\System-Warning.exe
| Option | Description |
|---|---|
--onefile |
Bundle into a single .exe (recommended for distribution) |
--windowed / --noconsole |
For GUI apps (no console window) |
--icon=app.ico |
Attach an icon (use .ico format) |
--add-data "src;dest" |
Include data files (use ; on Windows) |
--hidden-import modulename |
Fix missing imports |
--clean |
Remove temporary build files before building |
--noconfirm |
Overwrite previous builds without asking |
Example with icon:
python -m PyInstaller --onefile --windowed --icon="C:\path\to\app.ico" "System-Warning.py"PowerShell note for --add-data quoting:
python -m PyInstaller --onefile --add-data 'C:\path\to\data\myfile.dat;data' "System-Warning.py"PyInstaller usually detects these automatically.
If not, add manual hints:
python -m PyInstaller --onefile --hidden-import=some_module "System-Warning.py"For data files, use:
python -m PyInstaller --onefile --add-data "assets;assets" "System-Warning.py"Command Prompt:
python -m venv venv
venv\Scripts\activate
pip install pyinstaller
python -m PyInstaller --onefile "System-Warning.py"PowerShell:
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install pyinstaller
python -m PyInstaller --onefile "System-Warning.py"If activation is blocked:
Set-ExecutionPolicy RemoteSigned(Run as Administrator and understand the implications before changing execution policy.)
After running PyInstaller:
- ✅
dist\System-Warning.exe— final executable - 🧩
build\...— build intermediates - ⚙️
System-Warning.spec— configuration file (editable for advanced builds)
To clean up:
rmdir /s /q build dist
del System-Warning.spec- Test the
.exeon a machine without Python installed - Some antivirus software may flag unsigned executables
- Code sign your exe if you plan broad distribution
- Single-file
.exes are larger because they bundle the Python runtime
- If your exe crashes, rebuild without
--windowedto see the error:python -m PyInstaller --onefile "System-Warning.py" - Run from CMD to read any error messages.
- Check missing resources (
--add-data) or hidden imports.
Other tools exist (like cx_Freeze, py2exe),
but PyInstaller remains the most popular and simplest for most needs.
⭐ If you found this project helpful, please give it a star!