def __init__(self, track = ):
#: Internal data with time to play. Source for self.get_data()
- self._data = None # [(time_to_play, item, related_item)]
+ self._data = None # [(time_to_play, item, related_item)]
# for codeswarms: item = author, related_item = file.
#: The time when the data property was last accessed.
self.last_access_time = None
# only the mail addresses
all_recipients = [addr for name, addr in getaddresses(tos + ccs + resent_tos + resent_ccs)]
+ subject = mail.get("Subject")
# turn the mail into a set of simply tuples and append these to the data
for to in all_recipients:
multiplier = time_to_play / (self.max_timestamp - first_date)
# Normalize all dates, so they begin at 0 and extend for "time" seconds.
data = [((date - first_date)*multiplier, date, fro, to) for date, fro, to in data]
- # and sort the data in place
+ # and sort the data in place
# If we want to track only one, we split the communication - and if we want to be recursive, we also track all contacts.
"""@return: current changes which should be displayed at once."""
# If data was never accessed before, set the current time for last access.
if self.last_access_time is None:
self.last_access_time = time()
# increase the time up to which we want to show the data
self.time_delta += time() - self.last_access_time
# Update the last access time
- # get all datapoints up to the
+ self.last_access_time = time()
+ # get all datapoints up to the time delta
data = [(date, fro, to) for reltime, date, fro, to in self._data if reltime <= self.time_delta]
# remove all these datapoints from the private data.
self._data = [(reltime, date, fro, to) for reltime, date, fro, to in self._data if reltime > self.time_delta]
- self.last_access_time = time()
#: The default time in seconds we want a code_swarm to last
#: Some pre-shutdown wait time. The number of frames the scene will still run.