Re: Cron Job Output

2009-12-02 Thread LoD MoD
You might try something like this http://code.activestate.com/recipes/157035/ On Wed, Dec 2, 2009 at 3:05 PM, baytes wrote: > I have cron checking services every 5-10 minutes, and if a service > goes up or down it writes to a file, Im trying to write a script that > will check that file for upda

urllib post and redirect = fail

2009-12-10 Thread LoD MoD
I'm trying to do a post to log into a simple admin console. All I get is a simple you need to log in error. I already mapped the form id's to make sure they are correct, but it still seems to deny. I know mechanize would probably do a better job of this than urllib, but their docs for python aren't

getopt code NameError exception on logTail.py

2009-07-17 Thread LoD MoD
I am having trouble extending my option parsing. Any help is appreciated: import sys import getopt import time def tail(file): while 1: where = file.tell() line = file.readline() if not line: time.sleep(1) file.seek(where) el

Re: getopt code NameError exception on logTail.py

2009-07-17 Thread LoD MoD
In this instance the trackback was somewhat unhelpful.There problem was here: file = open(filename, 'r') should be file = open(a, 'r') args should be passed within the getopt riff On Fri, Jul 17, 2009 at 11:08 AM, MRAB wrote: > LoD MoD wrote: &

creating my own logwatch in python

2009-07-17 Thread LoD MoD
I am trying to fabricate a logwatch-type script in Python and I'm having some trouble.What happens with the following code is that it prints to the screen but the if condition on line 22 never gets executed. http://pastie.org/549975 Any suggestions are appreciated. -- http://mail.python.org/mail