Python log time window
Question: I was asked to edit a script that would allow you time print out a time window
of information from a log file. I am having a hard time figuring out what
would be the best way of going about this. The logs have the time at the start
of the log as follows:

    
    
    [11-Oct-2012 07:41:22.205608
    

I would need to be able to narrow it down by hour, min, or seconds. I don't
care about the day month or year.


Answer: 
    import datetime
    
    datetime.datetime.strptime("11-Oct-2012 07:41:22.205608", "%d-%b-%Y %H:%M:%S.%f")
    

would be the way to do it.

> <http://docs.python.org/library/datetime.html#datetime.datetime.strptime> \-
> return a datetime corresponding to date_string, parsed according to
> format...

