repython

Tool to restart commands based on filesystem changes
Download

repython Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Reinis Ivanovs
  • Publisher web site:
  • http://untu.ms/

repython Tags


repython Description

repython is a Python utility to run a command and then restart it based on filesystem changes. It's useful for quickly testing changes to a running program. For instance, Django uses a similar but more sophisticated method to reload its source code when it detects a change.repython uses the pyinotify library to make monitoring for changes efficient compared to just polling the filesystem.InstallationYou can install the repython module using: python setup.py installrepython is also available from the Cheeseshop: pip install repythonOr using setuptools:easy_install repythonUsageBasic example: python -m repython "python example.py"This would open the command in a subprocess and recursively monitor the current working directory for any changed files matching the *.py filename pattern (default behavior).repython is not limited to running Python programs, so a command like this should work as well: python -m repython "ruby example.rb" -p "*.rb" "*.txt"The `-p` or `--pattern` arguments determine which file changes trigger restarting the run command.The `-d` or `--directory` arguments allow monitoring other directories than the current working directory. It can be used like this: python -m repython "python example.py" -d . ~/exampleThis command would make repython recursively monitor (i.e., including subdirectories) both the working directory and the `~/example` directory.The `-v` or `--verbose` argument can be used to get more detailed output from repython, and the `-q` or `--quiet` argument can be used to suppress repython output.For more details please see:python -m repython --helpProduct's homepage


repython Related Software