[Tutor] Timer with exe command

Corey Richardson kb1pkl at aim.com
Mon Feb 28 21:36:27 CET 2011


On 02/28/2011 03:30 PM, Corey Richardson wrote:
> On 02/27/2011 10:02 PM, Kaden McLaws wrote:
>> I would like to set up the following using python: A timer that is activated when a user logs on to our computer, then shuts the computer down when the timer runs out (no matter what, ending all programs). First, a raw input is used, so that if you know the password, you may shut off the timer (set for 90 mins). Otherwise, it is activated. This is a timer to be used so (anonymous) can only spend 90 mins playing Modern Warfare, and not hours upon end like he does. I was also wondering about parsing. It would be effective if the last time the timer activated was recorded in a txt file, logged, so that the program can check and ensure that the last time the timer ended was at least 12 hours ago, so the computer just isnt turned right back on for another 90 mins repeatedly.Is there also a way to run the python hidden in the background so he cannot just figure out how to close it?If you aren't sure off all the details, email me back. Thanks for helping me save (anonymous) from 
w
> asting too much time on MW2! :)
> 
> [...]
> 
> Should be everything you need.
> 

Oh, and

http://docs.python.org/library/subprocess.html

I partially disagree with Wayne, it is certainly doable, and isn't too
too hard, but it will certainly take some doing without any Python
knowledge, so do take the time to learn.

I suggest http://www.alan-g.me.uk/l2p/
-- 
Corey Richardson


More information about the Tutor mailing list