control kids' game plays

Scott Hathaway slhath at flash.net
Mon May 8 11:31:56 EDT 2000


Yes, you could do it easily in Win95.  Have a python script running in the
background that monitors the names of various windows when then pop up.
Have it close the window after a period of time or simply log the window.
This is done is the Windows API.  I am too new to Python to tell you how to
do it with it, but I could write a simple VB program to accomplish what you
want in about 2 hours.

Scott


"Joal Heagney" <sctheagn at kraken.itc.gu.edu.au> wrote in message
news:391664E3.8662CC8B at kraken.itc.gu.edu.au...
> benpark at my-deja.com wrote:
>
> > My kids play games on our home windows95 computer all the time. I would
> > like to control the times and durations of their playing. Is there any
> > way to do it with python?
> >
> > Ben
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> I don't think you could really stop them playing the games on win95. Any
> type of program wrapper you could build out of python, they could still
> execute the original game programs. Somebody may be able to create a
> program logger, one that records in a log when a particular program is
> running, and how long it runs for, but there's nothing in the win95 os
> that stops the kids from opening up the log and editing it, or stopping
> the program logger.  (And believe me, if they're half-way intelligent, and
> dedicated gamers, they're going to at least try how to overcome the
> program. Outwitting Dad would be too much of an enjoyable challenge.)
>
> At the very best, to stop the kids from turning the logger on and off, you
> could set up the program to write a special note in the log whenever the
> program is started up, or a periodic write to log. (And check the log
> yourself for any suspicious lengths of program down time.) You'll probably
> want to implement a daily log clean/mailing, or it'll swamp the disk after
> a few days.
>
> To prevent them mucking around with the log file, you could implement the
> following tamper testing every time the program writes to the log:
>
> Read the last access time of the file, BEFORE opening or editing the file.
>
> Open the file, read from the file the time of the last logging message.
> If last access time and last logging message time don't match, see red
> *smiles*.
> If last access time and last logging message time do match, write next
> logging message and logging time. You may have to release the log file
> after each message so that the interpreter doesn't screw up the last
> access time of the file. (Check with the more advanced users in the
> group.)
>
> Despite all these measures, you're still going to have to read the log
> (You may be able to get python to email the logs to you if your children
> and you use a different machine.), and employ parental sanctions if they
> go outside the agreed upon gaming times.
> If they play around with the log files or the program logger, you're going
> to have to employ stiffer sanctions. (Such as forcing them to wipe all
> computer games off their machine for one week. That should hurt. *grins*)
> Mind you, if they get really inventive and actually rewrite the logger,
> I'd be tempted to let them think they've gotten away with it for a week.
> At least their gaming addiction has forced them to learn some valuble
> python programming, but at the end of the week, I'd sit them down, tell
> them very sternly that they HAVEN'T gotten away with it, that you knew
> about it (Giving specific dates from when you did know always shakes them
> up.) and that you hope they realise in the real world, doing similar
> things would get them arrested.
>
> Anycase, I hope I've been of some help. I'm afraid I don't know enough
> about python to be able to help you write the logger though. I'm still
> trying to learn enough wxPython to write a chemical structure editor. I
> may give up and just use the TK toolkit.
>
> Joal Heagney/AncientHart
>





More information about the Python-list mailing list