Re: [Tutor] get last 7 days string in a log file

2011-08-01 Thread Bjørn Roar Eriksen
Yes, that is what I want to do. Kind Regard Bjørn-Roar Den 1. aug. 2011 kl. 20:24 skrev spa...@gmail.com: > Hi, > > Let me understand the problem > - Do you want to count the number of times the application was restarted > between today and 7 days back? > => If yes, then you will need to do s

Re: [Tutor] get last 7 days string in a log file

2011-08-01 Thread spawgi
Hi, Let me understand the problem - Do you want to count the number of times the application was restarted between today and 7 days back? => If yes, then you will need to do some string manipulation to get the required dates. Then you will need to apply both the conditions to the line i.e. if the

[Tutor] get last 7 days string in a log file

2011-08-01 Thread Bjørn-Roar Eriksen
Hi I'm new to Python and I'm trying to write a script that's count restart of an application. The log file contains: 2009-03-06 18:20:26,423 User operation - start nanny 2009-03-06 18:20:26,423 User operation - start all services And 2009-03-06 18:20:26,423 User operation - start all services t