Example #1
0
 def run(self):
     (options, args) = self.parser.parse_args()
     if not args:
         self.parser.error("No command specified")
     #self.options = options
     #command, args = args[0], args[1:]
     #print 'JsCommand:', command, args
     rpython2javascript_main(args)
Example #2
0
 def run(self):
     (options, args) = self.parser.parse_args()
     if not args:
         self.parser.error("No command specified")
     #self.options = options
     #command, args = args[0], args[1:]
     #print 'JsCommand:', command, args
     rpython2javascript_main(args)
Example #3
0
 def __init__(self, src, location=None):
     #print 'RPyJSSource: python:', src
     mod = 'RPyJSSourceTmp.py'
     f = open(mod, 'w')
     f.write(src)
     f.close()
     function_names = []
     from rpython2javascript.pypy.translator.js.main import rpython2javascript_main
     jssrc = rpython2javascript_main([mod] + function_names)
     #print 'RPyJSSource: javascript:', jssrc
     super(RPyJSSource, self).__init__(jssrc)