Created
March 27, 2013 17:30
-
-
Save JAlexoid/5256357 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_sms(number, number_to, time_start, time_end): | |
for entry in source: | |
if (entry.type == "sms" and | |
entry.number == number and | |
entry.number_to == number_to and | |
entry.time > time_start and | |
entry.time < time_end) : | |
return entry | |
for entry in source : | |
if entry.type == "call": | |
sms = find_sms(entry.number, | |
entry.number_to, | |
entry.time, | |
entry.time + 5*60) | |
if sms != None: | |
found_items.append(entry+sms) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment