Parsing a log file
googleboy
mynews44 at yahoo.com
Sun Aug 14 17:03:57 EDT 2005
I am similarly not a programmer but am trying to learn python to do
tasks like this. I would read through the regular expressions
tutorial. You could probably easily read in all teh lines of the log
file, and then split them up by " " (spaces)..
If you're right about the lines all being consistent, that should
easily handle each line.
>From there you could amost certainly drop off the trailling
milliseconds on the timestamps and do the simple data manipulation
you'd like.
here are a couple of links:
http://www.amk.ca/python/howto/regex/
http://gnosis.cx/publish/programming/regular_expressions.html
HTH
googleboy
More information about the Python-list
mailing list