#class QuaternionPickle():
    #def __init__(self,):
#        pass
#@staticmethod
if __name__ == '__main__':
    try:
        numToGen = 256
        multi = True
        pipe = Pipe()
        cmdQueue = JoinableQueue()
        events = {"AIEndInit":Event(),
                  "AIEndProc":Event(), 
                  "AICtrl":Event()}
        fileName = ""
        aiProc = 0
        if(multi):
            aiProc = Process(target=AIProc.run,args=(pipe[0],cmdQueue,numToGen,events))
            aiProc._daemonic = True
        
        ta = TutorialApplication(aiProc=aiProc, pipe=pipe[1], numToGen=numToGen, multi=multi, events=events, cmdQueue=cmdQueue)
        ta.go()
        #inform of process to clean up.
        m=["QUIT"]
        cmdQueue.put(m) 
        #events["AIEndProc"].wait()
        print "finished go"
        ta.console.parent = 0
        print "delete go"
    except ogre.OgreException, e:
        print e