def sub_to_app(): while 1: string = sub_to_app_socket.recv() unp.feed(string) # unpack the msg for msg in unp: if type(msg) is tuple: create_header(msg)
def start_batman(): while 1: #print "batman started" create_header(['batman']) sleep (120)