Roscidus.com Zero Install Mirror

» Main » simple_notify

simple_notify - A simple python-inotify wrapper

Published by Tim Cuthbertson

Overview

This is a Zero Install feed. To add this program to your Applications menu, choose Zero Install -> Add New Program from the Applications menu. e.g. on Ubuntu:

Adding with GNOME

If you don't see this menu item, install the zeroinstall-injector package from your distribution's repository, or from 0install.net.

Drag the feed's URL to the dialog box that appears. Other environments may use other systems. For example, if you are a ROX desktop user, drag the link to AddApp instead.

Alternatively, to run it from the command-line:

$ 0launch http://gfxmonk.net/dist/0install/simple_notify.xml

The 0alias command can be used to create a short-cut to run it again later.

If you don't have the 0launch command, download it from the 0install.net web-site, which also contains documentation about how the Zero Install system works.

Full name

http://gfxmonk.net/dist/0install/simple_notify.xml

Homepage

https://github.com/gfxmonk/simple_notify

Description

**Note**: I have discontinued development of simple_notify, in favour of using the cross-platform `watchdog` library: https://github.com/gorakhargosh/watchdog Example: import simple_notify def on_change(event): print "event " + event.event + " occurred to " + event.path watcher = simple_notify.watch("/tmp", callback=on_change) raw_input("press enter to quit...") ----- watch() spawns a new thread that will watch for inotify events and call your callback function. Directories are tracked recursively, so when watching "/tmp" you would see everything that happens in /tmp and any of its subdirectories Your callback receives as its single argument an Event instance. Event instances have the following fields: - path: path to file (relative to the watched root) - base: relative path to directory containing this node (from watch root) - name: name of this node - exists: (boolean) whether the file in this event now exists. False for REMOVED and MOVED_FROM events, True for ADDED, MODIFIED and MOVED_TO events - is_dir: boolean You can pass `ignore_modifications=True` to `watch` if you don't wish to be nodified of file modification events (merely additions, removals and moves).

Available versions

The list below is just for information; Zero Install will automatically select one of these versions for you.

VersionReleasedStabilityPlatformDownload
0.12010-12-04AnyDownload (1247 bytes)
0.1.12010-12-05AnyDownload (1184 bytes)
0.22011-01-11AnyDownload (2155 bytes)
Required libraries

The list below is just for information; Zero Install will automatically download any required libraries for you.