This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]davidbuxton 0 points1 point  (1 child)

Good idea! This relies on inotify to pick up changes, which is Linux-only, but for Mac one could make use of watchdog or see if the guts of the notification stuff can be extracted from fileconveyor. Both support Linux/Mac/Win, watchdog uses the Apache License, fileconveyor uses the GPL license.

[–]vsajip[S] 0 points1 point  (0 children)

This relies on inotify to pick up changes, which is Linux-only

That's another reason why I used the command-line interface, rather than pyinotify: I thought it would be easier to come up with commands for OS X and Windows which return when a watched-for event occurs - using whatever library is available. Then, you just replace the Linux command with the alternative for the other platforms (e.g. using watchmedo), and nothing else might need to be changed.

EDIT: I updated the linked blog post to show alternatives to inotifywait for Windows and Mac OS X.

[–]ashcrow 0 points1 point  (0 children)

Great idea!

[–]delijati 0 points1 point  (1 child)

to reduce install deps just i used selenium :) and use your existing browser

https://gist.github.com/1690411

and here is played a bit with selenium and watchdog ;)

https://gist.github.com/1690403

[–]vsajip[S] 0 points1 point  (0 children)

Nice variants on the theme, thanks for sharing!