A hot reload implementation for Tkinter applications
Project description
TkinterHotReload
A powerful hot reload utility for Tkinter applications that enables real-time code updates without restarting your application.
Features
- 🔄 Live code reloading for Tkinter applications
- 🚀 Zero configuration required
- 🎯 Automatic detection of file changes
- 💻 Seamless development experience
- 🛠 Maintains application state during reloads
Installation
Install TkinterHotReload using pip:
pip install tkhotreload --upgrade
Quick Start
Here's a simple example of how to use TkinterHotReload:
import tkhotreload as tkhr
from tkinter import Label, Button
def main(root: tkhr.TkinterHotReload):
# Use the new properties method to set multiple attributes at once
root.properties(
title="Tk Inter Reload",
always_on_top=True,
alpha=0.5,
icon="icon.ico",
debug=False,
)
Label(root, text="Change this and save!").pack(pady=20)
Button(root, text="Click me", command=lambda: print("Clicked!")).pack()
tkhr.app(target=main, watch_dir=".", exclude=["*.pyc", "__pycache__"])
How It Works
TkinterHotReload monitors your Python files for changes. When you modify and save a file, it automatically:
- Detects the changes in your code
- Reloads the modified modules
- Updates your Tkinter application while preserving its state
Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any issues or have questions, please:
- Open an issue on GitHub
- Check existing issues for solutions
- Provide detailed information about your problem
Acknowledgments
- Thanks to all contributors who have helped shape TkinterHotReload
- Inspired by hot reload functionality in modern web development
Made with ❤️ for the Python community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tkhr-0.1.1.tar.gz.
File metadata
- Download URL: tkhr-0.1.1.tar.gz
- Upload date:
- Size: 41.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b56a4c8c41575082ca0c41b5107ea943d4334c56b30fa01a55a70a0827b0978
|
|
| MD5 |
493a8a8de636d9c3108984b66f674783
|
|
| BLAKE2b-256 |
50cfaa59f1f6fe0dc8c5c9993f10f58a8afba7b3b60e4235d0af08806c511ebd
|
File details
Details for the file tkhr-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tkhr-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32b1ff2f2e2be460a579253671e5e6167489c028ce12abc3e20c26493ece7c29
|
|
| MD5 |
cd30bd440529c24dcc9fcc7f5c9675c8
|
|
| BLAKE2b-256 |
8fc8754703d7db786d75532db293e0c6c057de9016c1be3636c5830045661559
|