python filter can't output
<p>i create filter by python to the log file
like</p>

<pre><code>    Sat Jun  2 03:32:13 2012 [pid 12461] CONNECT: Client "66.249.68.236"
    Sat Jun  2 03:32:13 2012 [pid 12460] [ftp] OK LOGIN: Client "66.249.68.236", anon     password "gxxglxxxxt@google.com"
    Sat Jun  2 03:32:14 2012 [pid 12462] [ftp] OK DOWNLOAD: Client "66.249.68.236",   "/pub/10.5524/100001_101000/100022/readme.txt", 451 bytes, 1.39Kbyte/sec
</code></pre>

<p>the script is</p>

<pre><code>import time
f= open("/opt/CLiMB/Storage1/log/vsftp.log")
def OnlyRecent(line):
    if  time.strptime(line.split("[")[0].strip(),"%a %b %d %H:%M:%S %Y") &lt; time.time()-(60*60*24*2):
       return True
    return False

for line in f:
      if OnlyRecent(line):
         print line

f.close()
</code></pre>

<p>but when i run this script, it didn't show anything.
Why it can't shows records happened in 2 days.
And Since the log file is very large, and records are sorted by time, so how to speed up to find records.</p>

<p>Thanks</p>
