def _filePS(self, fname, bind=None):
     ps = PythonScript(fname)
     ps.ZBindings_edit(bind or {})
     ps.write(readf(fname))
     ps._makeFunction()
     if ps.errors:
         raise SyntaxError(ps.errors[0])
     return ps
 def _newPS(self, txt, bind=None):
     ps = PythonScript('ps')
     ps.ZBindings_edit(bind or {})
     ps.write(txt)
     ps._makeFunction()
     if ps.errors:
         raise SyntaxError(ps.errors[0])
     return ps
Exemplo n.º 3
0
 def _testScript(self,txt):
     theScript = PythonScript('test')
     theScript.ZBindings_edit({})
     theScript.write(txt)
     theScript._makeFunction()
     return theScript()