コード例 #1
0
ファイル: relay.py プロジェクト: tonyg/hop
 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()
コード例 #2
0
ファイル: unbabel.py プロジェクト: yhara/unbabel
 def run(self):
   result = self.run_command(self.stub.langdef.command, self.stub.script)
   return sexp.read_sexp(result)