Re: Running a python program during idle time only

2005-06-01 Thread los
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

Re: Running a python program during idle time only

2005-05-27 Thread John Abel
Shane Hathaway wrote: >Mike Meyer wrote: > > >>On a completely different topic, this looks like the wrong way to solve >>the problem. You want to update a search engine based on changes to the >>underlying file system. The right way to do this isn't to just keep >>rescanning the file system, it'

Re: Running a python program during idle time only

2005-05-27 Thread John Abel
John Abel wrote: >Shane Hathaway wrote: > > > >>Mike Meyer wrote: >> >> >> >> >>>On a completely different topic, this looks like the wrong way to solve >>>the problem. You want to update a search engine based on changes to the >>>underlying file system. The right way to do this isn't to ju

Re: Running a python program during idle time only

2005-05-27 Thread John Abel
Shane Hathaway wrote: >Mike Meyer wrote: > > >>On a completely different topic, this looks like the wrong way to solve >>the problem. You want to update a search engine based on changes to the >>underlying file system. The right way to do this isn't to just keep >>rescanning the file system, it'

Re: Running a python program during idle time only

2005-05-27 Thread Shane Hathaway
Mike Meyer wrote: > On a completely different topic, this looks like the wrong way to solve > the problem. You want to update a search engine based on changes to the > underlying file system. The right way to do this isn't to just keep > rescanning the file system, it's to arrange things so that yo

Re: Running a python program during idle time only

2005-05-24 Thread los
Yes it should. The problem is that I notice a loss in performance when the program is running at 100% CPU. Even though it is nice, if you try to open up new applications, or switch between them, you notice your computer lagging a little bit. That's why even though I'm not using the cpu that much

Re: Running a python program during idle time only

2005-05-23 Thread Asbjørn Sæbø
"los" <[EMAIL PROTECTED]> writes: > Thanks for all the replies. > > I did try using nice under windows. I created a java program that > would just loop and print numbers on the screen. Even when I ran that > simple program with nice, (lets call it program A) as soon as I started > the program t

Re: Running a python program during idle time only

2005-05-23 Thread David Rushby
los wrote: > I'm trying to create a program similar to that of Google's desktop that > will crawl through the hard drive and index files. I have written the > program and as of now I just put the thread to sleep for 1 second after > indexing a couple of files. > > I'm wondering if anyone knows of

Re: Running a python program during idle time only

2005-05-23 Thread Mike Meyer
"los" <[EMAIL PROTECTED]> writes: > Thanks for all the replies. > > I did try using nice under windows. I created a java program that > would just loop and print numbers on the screen. Even when I ran that > simple program with nice, (lets call it program A) as soon as I started > the program t

Re: Running a python program during idle time only

2005-05-23 Thread James Carroll
I think you can keep your sleep commands in your program to keep it from hogging the cpu even when you are running it as nice. You know, even more important than cpu load (since your indexer is accessing the hard drive, is hard drive access..) You can monitor the bytes / second going to the hard

Re: Running a python program during idle time only

2005-05-23 Thread los
Thanks for all the replies. I did try using nice under windows. I created a java program that would just loop and print numbers on the screen. Even when I ran that simple program with nice, (lets call it program A) as soon as I started the program the cpu went all the way to 100% usage. Then wh

Re: Running a python program during idle time only

2005-05-22 Thread Terry Hancock
On Friday 20 May 2005 08:06 pm, los wrote: > I'm wondering if anyone knows of a way that I could make so that the > program will run at full speed only runs after the computer has been > idle for a while. I've looked at the "nice" command but that's not > exactly what I want. You need to define w

Re: Running a python program during idle time only

2005-05-22 Thread Cousin Stanley
| | I'm wondering if anyone knows of a way that I could make so that | the program will run at full speed only runs after the computer | has been idle for a while. Perhaps looking at some ScreenSaver code could be useful I've never considered how this is done myself, but ScreeS

Re: Running a python program during idle time only

2005-05-21 Thread James Carroll
There's probably a way to tell how long the user has been idle, but here's how you can check the CPU load to see if it's elevated... (of course your program might elevate it too.) On linux, you can read from /proc/loadavg Here's a fun thing to try on windows... make sure you have the win32all

Re: Running a python program during idle time only

2005-05-20 Thread Donn Cave
Quoth Mike Meyer <[EMAIL PROTECTED]>: | "los" <[EMAIL PROTECTED]> writes: | > I'm trying to create a program similar to that of Google's desktop that | > will crawl through the hard drive and index files. I have written the | > program and as of now I just put the thread to sleep for 1 second afte

Re: Running a python program during idle time only

2005-05-20 Thread Mike Meyer
"los" <[EMAIL PROTECTED]> writes: > I'm trying to create a program similar to that of Google's desktop that > will crawl through the hard drive and index files. I have written the > program and as of now I just put the thread to sleep for 1 second after > indexing a couple of files. > > I'm wonder