[Tutor] log parsing
mosinu at gmail.com
Wed Nov 30 16:20:35 CET 2005
Cool, thanks Kent.
On 11/29/05, Kent Johnson <kent37 at tds.net> wrote:
> Will Harris wrote:
> > I am trying to work out doing a bit of log parsing in python. Below is
> > the code I have gotten so far, It works in an earlier version of this
> > one but this one doesn't print out the lines in my log files. Does
> > anyone see anything that I am missing here or can just point me in the
> > direction to look?
> > for logs in sys.argv[1:]:
> > open(logs)
> > for line in logs:
> This should be something like
> f = open(logs)
> for line in f:
> You are opening the file and throwing it away, then iterating over the
> command line argument.
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor