Skip to main content

Runs arbitrary commands if files specified to be watched change.

Project description

A python clone (almost) of the Linux watch command.

The pywatch.watcher.Watcher class can be told to watch a set of files, and given a set of commands to run whenever any of those files change.

It was inspired by Ruby’s ZenTest, but while it can be used for testing, pywatch is intended to run any command when files change… test runners or otherwise.

See pywatch.autotest for an example of a continously running watch-and-runner.

pywatch usage

Usage: pywatch [options] “command” file1 file2 …

Options:
-h, --help

show this help message and exit

-v, --verbose

Output timestamp when commands are run.

--version

Output version number and exit

Changelog

0.4

  • Directories are now walked recursively and all files are added and watched

0.3.2

  • Added –version

0.3.1

  • Changed setup.py to include proper url

  • Added error catching for os.stat calls

  • pywatch with no args displays usage

0.3

  • Added pywatch command line client

0.2

  • Fixed missing os import in setup.py

0.1

  • Initial release of python module

Project details


Download files

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

Source Distribution

pywatch-0.4.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file pywatch-0.4.tar.gz.

File metadata

  • Download URL: pywatch-0.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pywatch-0.4.tar.gz
Algorithm Hash digest
SHA256 b853e12055fff62026ce0b7275fa97d2d2862a486fb9259700949cda5caee1cf
MD5 2d398ec66eb889eabc44086c9313b4d7
BLAKE2b-256 c4ae5db78d952e0159d735222fb067664886536eb8fa9524c6eeaa546cec0909

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