Introducing myself as a very new beginner in python so sorry for basic questions as always,

so heres my problem. I have a log output from a router which I collect using python. The output contains several lines of logs each with a timestamp. Now I need to process this output and print just one line out of the output. This line tat I want to print is based on the specific time of the day.

The challenge is the time is epoch time. I have to print say for example the line corresponding to 12:15 AM in the logs by parsing each line of epoch time, convert it to date/time format and then if it matches 12:15, print only that line from the log.

My idea was to import the epoch time into array, convert the epoch time to readable time, then do a condition match. But it turned out to be much more complex than that and I couldnt get it work.

Could someone help me. Here is a sample output: the big numbers like 1375976271 are the epoch time start and end. from this output I want to print the line matching a specific time.

The datetime module is probably what you want. If you still have questions after looking at that, please post your code attempt, even if it fails, and explain what your code attempts to accomplish but doesn't manage to, as well as what it does do.

Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.