Skip to main content

Re-run command-line every time any files are updated in the current directoryor its subdirectories.

Project description

Usage

rerun [command]

e.g:

rerun python -m unittest mypackage.mymodule

will rerun your tests every time you save your source code. Handy for seeing the new test results in a console window after you hit ‘save’ in your editor, without having to change window focus.

For options, see:

rerun --help

It detects changes to files by polling file modification times once per second. On detecting any changes, it clears the terminal and then reruns the given command once.

Polling for modification times perhaps isn’t ideal. Registering of OS-specific notifications of file system events might be better. In practice though, I haven’t noticed it burden my machine, even in project directories containing hundreds of files.

It ignores directories called .svn, .git, .hg, .bzr, build and dist. It ignores files ending with .pyc or .pyo.

Dependencies

Tested on WindowsXP, Windows 7, MacOSX, and Ubuntu.

Runs under Python2.7 or 3.2.

No other dependencies.

Install

pip install rerun

Thanks

The idea came from the bash command ‘watch’, and inspiration for this implementation came from an old blog post by Jeff Winkler, whos website http://jeffwinkler.net seems to have now died.

Contact

Jonathan Hartley, tartley@tartley.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

rerun-1.0.0-rc.zip (7.0 kB view details)

Uploaded Source

rerun-1.0.0-rc.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file rerun-1.0.0-rc.zip.

File metadata

  • Download URL: rerun-1.0.0-rc.zip
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rerun-1.0.0-rc.zip
Algorithm Hash digest
SHA256 ca93fc28a5b1fe817e01d31e6ebd5c124ec5977682f1add1286872ac6e6e805d
MD5 4199d1091ff71a14089ddffdf0087fb0
BLAKE2b-256 a0d2508fa40ebd991b1820676fe2a198668ed6339553f7ce446b4867d16ae9ca

See more details on using hashes here.

File details

Details for the file rerun-1.0.0-rc.tar.gz.

File metadata

  • Download URL: rerun-1.0.0-rc.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rerun-1.0.0-rc.tar.gz
Algorithm Hash digest
SHA256 481c93e761e0cce87bf013a18fbc527bbb3ab4bdf774cbc7af9f1062e3c91994
MD5 2cb8814f9e882cc81f3cf0fbea20537a
BLAKE2b-256 a3a31bdeb0a39a35a160c06c765df220efb36182a99d336b1dac0560e90bf2a6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page