diff options
author | Daniel Black <grooverdan@users.sourceforge.net> | 2013-12-23 10:13:20 +0000 |
---|---|---|
committer | Daniel Black <grooverdan@users.sourceforge.net> | 2013-12-23 10:13:20 +0000 |
commit | a9a07cd3879ce165c2ac01fa242ad93f40a6ac6b (patch) | |
tree | 8dfe58503359ddc76737dcf43dcf0719cd54be25 /python3/pyinotify.py | |
parent | 51aa5bd8c22c5ff8c730f97178f000b55cb02f0f (diff) | |
download | pyinotify-a9a07cd3879ce165c2ac01fa242ad93f40a6ac6b.tar.gz |
add glob option to command line
Diffstat (limited to 'python3/pyinotify.py')
-rwxr-xr-x | python3/pyinotify.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python3/pyinotify.py b/python3/pyinotify.py index f72fec1..de88c65 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -2239,6 +2239,9 @@ def command_line(): parser.add_option("-a", "--auto_add", action="store_true", dest="auto_add", help="Automatically add watches on new directories") + parser.add_option("-g", "--glob", action="store_true", + dest="glob", + help="Treat paths as globs") parser.add_option("-e", "--events-list", metavar="EVENT[,...]", dest="events_list", help=("A comma-separated list of events to watch for - " @@ -2314,7 +2317,7 @@ def command_line(): log.debug('Start monitoring %s, (press c^c to halt pyinotify)' % path) - wm.add_watch(path, mask, rec=options.recursive, auto_add=options.auto_add) + wm.add_watch(path, mask, rec=options.recursive, auto_add=options.auto_add, do_glob=options.glob) # Loop forever (until sigint signal get caught) notifier.loop(callback=cb_fun) |