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.

Kent

-- 
http://www.kentsjohnson.com

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to