Running a python program during idle time only

los carlos80 at gmail.com
Wed Jun 1 14:42:18 EDT 2005


I'm writting the code with the win32 module I found.  The way I'm
planning on attacking the problem after reading all the remarks is as
follows:

1.) have the program run a full system index, and once it completes it
turn the flag on a configuration file to true
2.) after this initial index, every time the program is started it will
check this flag in the configuration file, and if it has had the full
system index then the system will be kept up to date using the win32
modules, listening for events and changes made to the file system.  I
am basing my code pretty closely to what I found in the last example of
this page
http://tgolden.sc.sabren.com/python/win32_how_do_i/watch_directory_for_changes.html

I'm aware that in case the program isn't running, all the changes made
to the file system during that time won't be picked up next time the
program starts.  I haven't thought of a good way to solve this problem
other than just do a full system index every once in a while to
actually go through each directory updating and deleting records as
necessary.

Thanks once again for the posts!

-los




More information about the Python-list mailing list