Skip to content

automatically reexecutes python files when it detects changes

License

Notifications You must be signed in to change notification settings

makerGeek/reloady

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reloady

A hotreload cli that automatically reexecutes python files when it detects changes

Port of Jesper's SourceChangeMonitor.py to python 3

Instructions on how to use are here ( or on Wayback machine, just in case.. )

Installation

pip install reloady

Use cases

This package is a command line tool that can be used to automatically restart a python program when it detects changes in the source code. It is designed to be used in development environments where you want to make changes to your code and see the results immediately without manually restarting the program. Some examples use cases are:

  • competitions where you want to make changes to your code and see the results immediately.
  • training for problems on leetcode or codewars where you want to make changes to your code and see the results instantly.
  • debugging problems in a running program by making changes to the code and seeing the results immediately.
  • visualizing the output of a program in real time. examples/printer.py is an example of a program that visualizes the output of a program in real time.

Reloady Demo

P.S. cli command has been renamed from pyreload to reloady

Usage

reloady your_program.py

with arguments

reloady main.py arg1 arg2

examples

Two Sum problem

cd examples/two_sum
reloady main.py

In this example, the program will automatically restart when changes are detected in either main.py or two_sum.py. main.py will test all cases in input.txt and compare the output with output.txt.

Colored Text example

cd examples/printer
reloady main.py

In this example, the program will automatically restart when changes are detected in either main.py or printer.py.

It is usefule to see how the colored text will look like without having to run the program manually for each change.

About

automatically reexecutes python files when it detects changes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages