Hi,
try this on the attached ui.py:
$ python py2js.py ui.py
Traceback (most recent call last):
File "py2js.py", line 47, in <module>
code = pyread(argfile)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 623, in pyread
return gv.parse(contents)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 83, in parse
return self.visit(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 510, in Module
modulebody = self.Statements(ast.body)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 548, in Statements
stmts = self.visit(s)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 463, in ImportFrom
code = pyread(modpath,(ast.module,modpath,namespace))
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 623, in pyread
return gv.parse(contents)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 83, in parse
return self.visit(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 510, in Module
modulebody = self.Statements(ast.body)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 548, in Statements
stmts = self.visit(s)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 463, in ImportFrom
code = pyread(modpath,(ast.module,modpath,namespace))
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 623, in pyread
return gv.parse(contents)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 83, in parse
return self.visit(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 510, in Module
modulebody = self.Statements(ast.body)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 548, in Statements
stmts = self.visit(s)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 463, in ImportFrom
code = pyread(modpath,(ast.module,modpath,namespace))
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 623, in pyread
return gv.parse(contents)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 83, in parse
return self.visit(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 510, in Module
modulebody = self.Statements(ast.body)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 548, in Statements
stmts = self.visit(s)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 303, in ClassDef
stmts = self.visit(stmt)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 388, in FunctionDef
body = self.Statements(ast.body)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 548, in Statements
stmts = self.visit(s)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 601, in While
body = self.Statements(ast.body)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 548, in Statements
stmts = self.visit(s)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 276, in Assign
expr = self.visit(ast.value)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 225, in ListComp
generators.append(self.visit(g))
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 90, in visit
return getattr(self,name)(ast)
File "/home/ondrej/repos/py2js-hg/pyfrontend.py", line 172, in comprehension
target = self.visit(e.left)
AttributeError: 'Name' object has no attribute 'left'
Note: it should probably raise an exception "Decorators are not
supported", or any other meaningful exception, so that I know what
exactly is wrong with my code.
Ondrej
--
You received this message because you are subscribed to the Google Groups "JavaScript for Python programmers" group.
To post to this group, send an email to
js...@googlegroups.com.
To unsubscribe from this group, send email to
js4py+un...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/js4py?hl=en-GB.