parsing log file and get time difference between two timestamp actions in python
In general, the indentation should be 4 spaces for each indentation level in Python. See PEP-0008 (the Python style guide). Loops and if statements should count as a level. The whole script could be shifted to the left, as well. Some of the variable names are a bit confusing because 'files' and 'file' can become easy to mix up as loop variables. One other thing of note is the spacing between things. I'd consider making fewer new lines between the bits of code. Some of the indentations seem like they should throw exceptions, so if you see IndentationErrors, that's what it's chirping about, I'd look at indenting after the blocks (for loops, and such).