Exemple #1
0
 def relay_main(self):
     self.write(['subscribe', self.namespace.nodename, '', '', '', ''])
     try:
         while True:
             try:
                 m = sexp.read_sexp(self.in_ch)
             except sexp.SyntaxError, e:
                 self.error('Syntax error', ["http://people.csail.mit.edu/rivest/Sexp.txt"])
                 return
             self.inbound_hop(m)
     except EOFError:
         pass
     finally:
         o = self.out_ch
         i = self.in_ch
         self.out_ch = None
         self.in_ch = None
         i.close()
         o.close()
Exemple #2
0
 def run(self):
   result = self.run_command(self.stub.langdef.command, self.stub.script)
   return sexp.read_sexp(result)