def GET_LISTING(self): """ Return a listing of all known variable and type information. """ def conv(src): "Convert to proper transmission structure" return dict((k, v.to_basic()) for k, v in src.iteritems()) data = { 'variables': conv(self.probe_loader.variables), 'structures': conv(self.probe_loader.structs), 'typedefs': conv(self.probe_loader.typedefs) } msg = simplejson.dumps(data) # reply(success_reply(msg)) from simx.act.context import R R.reply(success_reply(msg))
#print "value:",value.get() #rebound = self.probe_loader.lookup(varname, *rebindings) #print "rebound",rebound msg = simplejson.dumps(rebound.to_basic()) #print "msg:",msg #from simx.act.context import R #R.reply(msg) def ATTACH_NODE(self, probe_id, node_id): try: self.attach_node(probe_id, node_id) except StandardError, exc: reply(failure_reply(exc.message)) else: reply(success_reply("Good")) def GET_LISTING(self): """ Return a listing of all known variable and type information. """ def conv(src): "Convert to proper transmission structure" return dict((k, v.to_basic()) for k, v in src.iteritems()) data = { 'variables': conv(self.probe_loader.variables), 'structures': conv(self.probe_loader.structs), 'typedefs': conv(self.probe_loader.typedefs) }