[Tutor] python watchfolder as daemon
Hugo González Monteverde
hugonz-lists at h-lab.net
Thu Nov 10 21:48:18 CET 2005
Hi, I do this all the time. I use a recipe, and import a daemon module.
The module is here:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731
in your script, just do
import daemon
and
daemon.createDaemon()
Works like a charm.
Hugo
Frank Hoffsümmer wrote:
> Hello all,
> I found this gem of a python recipe that allows me to monitor a hierarchy of
> folders on my filesystem for additions / changes / removals of files:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215418
>
> I would like to monitor a folder hierarchy using this script but now I
> wonder what would be the best way to have this watchfolder script running at
> all times in the background?
>
> nohup python watchfolder.py myfolder &
>
> ? would that be suitable?? or is there a way to launch a process like that
> from python that detaches itself from the shell?
> what would be the best way, any insight or recommendation is very much
> appreciated
> thanks,
> -frank
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list