Unnamed
public python v1 · immutableimport urllib, urllib2from threading import Timerhistory = []def queue( typ, data ): history.append( { "type":typ, "data":data } )def persist(): print "hi"if __name__ == "__main__": queue( "file" , "aaa") queue( "foo" , "bbb") queue( "foo" , "ccc") queue( "file" , "ddd") t = Timer( 5.0, persist ) t.start()