Professional File & Directory Comparison Tool for Windows
A production-ready, feature-rich file and directory comparison application with modern GUI, syntax highlighting, and advanced diff algorithms.
Features β’ Installation β’ Usage β’ Screenshots β’ Documentation β’ Contributing
- Overview
- Features
- Screenshots
- Installation
- Quick Start
- Usage
- Configuration
- Plugin System
- Project Structure
- Building from Source
- Testing
- Contributing
- License
- Acknowledgments
Python ExamDiff Pro is a professional-grade file and directory comparison tool built for Windows. It combines the power of industry-standard diff algorithms with a modern, intuitive interface to help developers, content creators, and technical professionals efficiently compare files and directories.
- β Production-Ready: Built with enterprise-grade code quality and error handling
- β Modern UI: Beautiful CustomTkinter interface with dark/light themes
- β Powerful Engine: Implements Myers' diff algorithm for accurate comparisons
- β Extensible: Plugin system for custom functionality
- β Comprehensive: File comparison, directory comparison, three-way merge, and more
- β Developer-Friendly: Full CLI support, Git integration, and automation-ready
| Feature | Description |
|---|---|
| Myers' Diff Algorithm | Industry-standard O(ND) complexity algorithm for accurate line-by-line comparison |
| Multi-Mode Comparison | Two-way diff, three-way diff, and three-way merge with conflict resolution |
| Text & Binary Support | Compare text files with multiple encodings or binary files byte-by-byte |
| Large File Support | Efficiently handle files up to 1GB with chunked processing |
| Smart Ignore Options | Ignore whitespace, case, blank lines, comments, and custom regex patterns |
| Feature | Description |
|---|---|
| Dual-Pane View | Side-by-side comparison with synchronized scrolling |
| Color-Coded Highlighting | π’ Green (added), π΄ Red (deleted), π‘ Yellow (modified), βͺ Gray (unchanged) |
| Three-Level Diff | Line-level, word-level, and character-level highlighting |
| Diff Navigation | Previous/Next/Current with keyboard shortcuts (F7/F8) |
| Minimap Overview | Vertical bar showing all differences at a glance |
| Jump to Line | Quick navigation to specific line numbers (Ctrl+G) |
| Feature | Description |
|---|---|
| Recursive Tree Comparison | Full directory tree comparison with file status indicators |
| File Status Indicators | β
Identical, |
| Flexible Views | Tree view or flat list with smart filtering |
| Mass Operations | Copy, delete, synchronize between directories |
| Directory Snapshots | Save comparison state as XML for later review |
| Feature | Description |
|---|---|
| 25+ Languages | Python, JavaScript, Java, C++, C#, HTML, CSS, SQL, XML, JSON, and more |
| Multiple Themes | Light and dark color schemes |
| Auto-Detection | Automatic language detection from file extension |
| Powered by Pygments | Professional syntax highlighting library |
| Feature | Description |
|---|---|
| Inline Editing | Edit files directly in comparison panes |
| Copy Operations | LeftβRight or RightβLeft (whole file or selected lines) |
| Merge Changes | Select and merge specific changes with conflict resolution |
| Undo/Redo | Full undo/redo support for all edits |
| Tabbed Interface | Multiple comparisons simultaneously |
| Git Integration | Compare Git commits and branches |
| Bookmark System | Mark important differences for later review |
| Comparison History | Save and reload comparison sessions |
| Feature | Description |
|---|---|
| HTML Reports | Interactive navigation with clickable differences |
| PDF Reports | Print-ready documents with professional formatting |
| Unix Diff Format | Standard diff output for version control |
| Statistics | Lines added/deleted/changed with detailed metrics |
| Print Preview | Print directly from the application |
| Feature | Description |
|---|---|
| Explorer Context Menu | Right-click to compare files from Windows Explorer |
| File Associations | Handle .diff and .patch files |
| System Tray Icon | Quick access from system tray |
| Command-Line Interface | Full CLI for automation and scripting |
| Drag & Drop | Drop files/folders directly onto the window |
Note: Add screenshots of the application to showcase its features. Recommended screenshots:
- Main window with file comparison
- Directory comparison view
- Syntax highlighting example
- Three-way merge interface
- HTML report output
Main comparison window showing side-by-side file comparison with syntax highlighting
Directory comparison with tree view and file status indicators
Code comparison with Python syntax highlighting enabled
Three-way merge interface for conflict resolution
Interactive HTML report with navigation
- Python 3.11 or higher - Download Python
- Windows 10/11 - Primary platform support
- pip - Python package manager (included with Python)
-
Clone the repository
git clone https://github.com/gwaghmar/python-examdiff.git cd python-examdiff -
Install dependencies
pip install -r requirements.txt
-
Run the application
python main.py
On Windows, you can use the provided installation script:
.\install.ps1This script will:
- Check Python installation
- Create a virtual environment (optional)
- Install all dependencies
- Verify installation
Download the pre-built executable from Releases and run PythonExamDiff.exe directly.
To create your own standalone .exe file:
pip install pyinstaller
pyinstaller examdiff.specThe executable will be in the dist/PythonExamDiff folder.
Launch the application:
python main.pyThen:
- Click File β Compare Files or press
Ctrl+O - Select two files or directories
- View the comparison results
Compare two files:
python main.py file1.txt file2.txtCompare directories:
python main.py --dir folder1 folder2Three-way merge:
python main.py --merge base.txt yours.txt theirs.txt -o output.txtGenerate HTML report:
python main.py file1.txt file2.txt --html --output report.html --no-gui- Open Files:
File β Compare FilesorCtrl+O - Navigate Differences: Use
F7(previous) andF8(next) - Copy Changes:
Ctrl+Right(left to right) orCtrl+Left(right to left) - Save:
Ctrl+Sto save changes
- Open Directories:
File β Compare Directories - Filter Files: Use the filter toolbar to show only differences
- Synchronize:
Tools β Synchronizeto copy files between directories - Export:
File β Exportto save comparison results
| Shortcut | Action |
|---|---|
Ctrl+O |
Open files/directories |
Ctrl+S |
Save current file |
Ctrl+W |
Close current tab |
F5 |
Refresh/Re-compare |
F7 |
Previous difference |
F8 |
Next difference |
Ctrl+G |
Go to line |
Ctrl+F |
Find |
Ctrl+H |
Find and replace |
Ctrl+Left |
Copy to left pane |
Ctrl+Right |
Copy to right pane |
Ctrl+Z |
Undo |
Ctrl+Y |
Redo |
Ctrl+Tab |
Next tab |
Ctrl+Shift+Tab |
Previous tab |
python main.py [FILE1] [FILE2] [OPTIONS]
Positional Arguments:
files Files or directories to compare
Comparison Mode:
--dir Compare directories
--merge Three-way merge mode
Output Options:
-o, --output FILE Output file path
--html Generate HTML report
--pdf Generate PDF report
--unified Generate unified diff
Comparison Options:
--ignore-case Ignore case differences
--ignore-whitespace Ignore whitespace
--ignore-blank-lines Ignore blank lines
--syntax LANG Syntax highlighting language
--encoding ENC File encoding (utf-8, utf-16, etc.)
Directory Options:
--recursive Recursive directory comparison (default)
--no-recursive Non-recursive comparison
GUI Options:
--no-gui Command-line mode only
--theme THEME GUI theme (light/dark)Compare Python files with syntax highlighting:
python main.py script1.py script2.py --syntax pythonCompare directories and generate HTML report:
python main.py --dir project1 project2 --html --output report.html --no-guiIgnore whitespace and case:
python main.py file1.txt file2.txt --ignore-whitespace --ignore-caseThree-way merge:
python main.py --merge base.txt mine.txt theirs.txt -o merged.txtThe application uses a YAML configuration file stored at:
%APPDATA%\PythonExamDiff\config.yaml
You can customize:
- Colors: Diff highlighting colors (added, deleted, modified, unchanged)
- Fonts: Font family and size for text display
- Default Ignore Options: Case, whitespace, blank lines, comments
- Keyboard Shortcuts: Customize key bindings
- Window Settings: Size, position, theme preferences
- Plugin Settings: Configure loaded plugins
- Recent Files: Limit for recent files list
- Via GUI:
Settings β Preferences - Manually: Edit
%APPDATA%\PythonExamDiff\config.yamldirectly
appearance:
theme: dark
font_family: Consolas
font_size: 11
colors:
added: "#00ff00"
deleted: "#ff0000"
modified: "#ffff00"
unchanged: "#808080"
comparison:
ignore_case: false
ignore_whitespace: false
ignore_blank_lines: false
ignore_comments: true
window:
width: 1200
height: 800
maximized: falsePython ExamDiff Pro includes a powerful plugin system for extending functionality.
- Create a plugin file in the
plugins/directory:
# plugins/my_plugin.py
from plugins.plugin_base import PluginBase
class MyPlugin(PluginBase):
name = "My Custom Plugin"
version = "1.0.0"
description = "Adds custom functionality"
def initialize(self):
"""Initialize the plugin."""
return True
def process_diff(self, diff_result):
"""Process diff results."""
# Your custom processing logic
return diff_result
def cleanup(self):
"""Cleanup when plugin is unloaded."""
pass- Place the plugin in the
plugins/directory - Restart the application - plugins are auto-loaded on startup
Plugins can:
- Process diff results before display
- Add custom menu items
- Register keyboard shortcuts
- Generate custom reports
- Integrate with external tools
See plugins/plugin_base.py for the complete API documentation.
python-examdiff/
βββ core/ # Core comparison engine
β βββ __init__.py
β βββ myers_algorithm.py # Myers' diff implementation
β βββ diff_engine.py # Main diff engine
β βββ file_handler.py # File I/O operations
β βββ directory_handler.py # Directory operations
β
βββ gui/ # GUI components
β βββ __init__.py
β βββ main_window.py # Main application window
β βββ file_select_dialog.py # File selection dialogs
β
βββ utils/ # Utility modules
β βββ __init__.py
β βββ syntax_highlighter.py # Syntax highlighting
β βββ report_generator.py # Report generation
β βββ helpers.py # Helper functions
β
βββ plugins/ # Plugin system
β βββ __init__.py
β βββ plugin_base.py # Plugin base class
β βββ example_statistics.py # Example plugin
β
βββ tests/ # Unit tests
β βββ __init__.py
β βββ test_myers.py # Myers algorithm tests
β βββ test_file_handler.py # File handler tests
β
βββ docs/ # Documentation
β βββ screenshots/ # Screenshot images
β
βββ main.py # Application entry point
βββ config.py # Configuration management
βββ requirements.txt # Python dependencies
βββ pyproject.toml # Package configuration
βββ examdiff.spec # PyInstaller specification
βββ install.ps1 # Installation script
βββ LICENSE # MIT License
βββ README.md # This file
-
Clone the repository
git clone https://github.com/gwaghmar/python-examdiff.git cd python-examdiff -
Create a virtual environment (recommended)
python -m venv venv venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Install development dependencies
pip install -r requirements.txt[dev]
pip install pyinstaller
pyinstaller examdiff.specThe executable will be in dist/PythonExamDiff/.
pytest tests/pytest --cov=. tests/pytest tests/test_myers.py -vContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes with tests
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow PEP 8 style guidelines
- Add type hints to all functions
- Write docstrings for all classes and functions
- Add tests for new features
- Update documentation as needed
Overall Progress: 100% Complete β Production Ready
- Myers' diff algorithm implementation
- Multi-mode comparison (two-way, three-way, merge)
- Syntax highlighting (25+ languages)
- Directory comparison
- Export functionality (HTML, PDF, Unix diff)
- Windows integration (context menu, file associations)
- Plugin system
- Comprehensive documentation
Status: Fully functional and production-ready.
This is a desktop application (not web-deployed). Available as:
- Standalone executable (Windows)
- Python package (pip installable)
- Source code distribution
Installation Requirements:
- Windows 10/11
- Python 3.11+ (for source installation)
- Or use pre-built executable (no Python required)
This project is licensed under the MIT License - see the LICENSE file for details.
- Eugene Myers - For the Myers diff algorithm
- ExamDiff Pro - Inspiration for features and design
- CustomTkinter - Modern GUI framework
- Pygments - Syntax highlighting library
- All Contributors - Thanks to everyone who has contributed!
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: See USAGE.md for detailed usage guide
- Cloud storage integration (Google Drive, OneDrive, Dropbox)
- Real-time collaboration features
- AI-powered smart merge suggestions
- Image comparison with visual diff
- Multi-language UI (i18n)
- Web-based interface
- Integration with more version control systems
- Performance optimizations for very large files
- Custom diff algorithm implementations
- Plugin marketplace
Made with β€οΈ for developers who need powerful comparison tools
β Star this repo β’ π Report Bug β’ π‘ Request Feature