🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

tkhr

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tkhr

A hot reload implementation for Tkinter applications

0.1.2
PyPI
Maintainers
1

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 tkhr --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

Keywords

development-tools

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts