System-Warning

⚡ Prank App – System Warning Demo

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.


🚀 Features


🧠 Learning Goals

This project demonstrates:


⚠️ Disclaimer

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.


🛠️ Requirements

Install dependencies before running:

pip install pyttsx3

(winsound is built-in on Windows)


▶️ How to Run

  1. Download or clone this repository
  2. Open a terminal in the project directory
  3. Run the script:
python "System-Warning.py"
  1. To safely exit the demo, press:
    Ctrl + 0
    

🗜️ Convert Python Script to Windows .exe

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.


  1. Open cmd or PowerShell.
  2. (Optional but recommended) Create & activate a virtual environment.
  3. Install PyInstaller:
    pip install pyinstaller
    
  4. Build the .exe with PyInstaller.
  5. Find your executable inside the dist\ folder.

🧩 Example — Basic Console Program

Assume your script is System-Warning.py.

Command Prompt:

python -m pip install --upgrade pip
python -m pip install pyinstaller
python -m PyInstaller --onefile "System-Warning.py"

PowerShell:

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

⚙️ Common Useful PyInstaller Options

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"

💡 For Apps Using Tkinter, PyQt, pandas, numpy, etc.

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.)


📦 Where to Find the Built .exe

After running PyInstaller:

To clean up:

rmdir /s /q build dist
del System-Warning.spec

🧪 Testing and Distribution


🧯 Troubleshooting


🔄 Alternatives

Other tools exist (like cx_Freeze, py2exe),
but PyInstaller remains the most popular and simplest for most needs.



👨‍💻 Author

Md Anayet Hossen
💼 Diploma Student in Computer Science

If you found this project helpful, please give it a star!