All pastes #894722 Raw Edit

Mine

public text v1 · immutable
·published 2008-02-07 05:35 UTC
rendered paste body


import urllib, urllib2

from threading import Timer


history = []


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()