Re: performance problem with time.strptime()

2009-07-02 Thread Dave Angel
Nils Rüttershoff wrote: Hi everyone, In my free time I translate scripts from open source projects or write my own, to train my python skills. ATM I convert the aplogmerge.pl from awstats. It merges multiple apache logfiles and sort the output by the timestamps of each line. My first version of

Re: performance problem with time.strptime()

2009-07-02 Thread Nils Rüttershoff
Hi Casey Casey Webster wrote: > On Jul 2, 7:30 am, Nils Rüttershoff wrote: > > >> Rec = >> re.compile(r"^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\s-\s\d+\s\[(\d{2}/\w+/\d{4}:\d{2}:\d{2}:\d{2})\s\+\d{4}\].*") >> Line = '1.2.3.4 - 4459 [02/Jul/2009:01:50:26 +0200] "GET /foo HTTP/1.0" 200 >> - "-" "www.e

Re: performance problem with time.strptime()

2009-07-02 Thread Casey Webster
On Jul 2, 7:30 am, Nils Rüttershoff wrote: > Rec = > re.compile(r"^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\s-\s\d+\s\[(\d{2}/\w+/\d{4}:\d{2}:\d{2}:\d{2})\s\+\d{4}\].*") > Line = '1.2.3.4 - 4459 [02/Jul/2009:01:50:26 +0200] "GET /foo HTTP/1.0" 200 - > "-" "www.example.org" "-" "-" "-"' I'm not sure how

performance problem with time.strptime()

2009-07-02 Thread Nils Rüttershoff
Hi everyone, In my free time I translate scripts from open source projects or write my own, to train my python skills. ATM I convert the aplogmerge.pl from awstats. It merges multiple apache logfiles and sort the output by the timestamps of each line. My first version of this script hasn't a good