def rpc_get_test_data(self,arg): print 'getting test data',self.__filename f = files.get_ideal(self.id(),'audio',files.FileSystemFile(self.__filename,'audio'),0) if resource.os_path_exists(self.__filename) else '[]' print 'got recording',f d = self.audio.get_dropout_count() print 'got dropouts',d return logic.render_term((f,d))
def resolve_file_cookie(self, cookie): print 'resolve_file_cookie', cookie if cookie == 'audio': return files.FileSystemFile(self.__filename, 'audio') return agent.Agent.resolve_file_cookie(self, cookie)
def __get_recording(self, arg): return files.get_ideal(self.id(), 'audio', files.FileSystemFile(self.__filename, 'audio'), 0)
def getIcon(self,a): dsc=logic.parse_clause(a) print 'Icon Manager getIcon: dsc=',dsc if os.path.splitext(dsc)[1]=='': dsc=dsc+'.png' if dsc in self.__f2p: uid=self.__f2p[dsc] print 'uid=',uid if os.path.exists(uid): return logic.render_term((dsc,files.get_ideal(logic.make_expansion('~server'),'file_sys:%s'%uid,files.FileSystemFile(uid,dsc),True)))
def rpc_auxinfo(self,a): print 'auxinfo',a (dlist,cnum) = logic.parse_clause(a) map = tuple([(dsc,files.get_ideal(logic.make_expansion('~server'),'file_sys:%s'%uid,files.FileSystemFile(uid,dsc),True) ) for (uid,dsc) in self.__values[cnum:]]) return logic.render_term(map)