From: <fwi...@us...> - 2009-01-14 14:10:07
|
Revision: 5930 http://jython.svn.sourceforge.net/jython/?rev=5930&view=rev Author: fwierzbicki Date: 2009-01-14 14:09:58 +0000 (Wed, 14 Jan 2009) Log Message: ----------- oops, move back to _ast since I want to compare with Python 2.5 which does not yet have ast.py. Modified Paths: -------------- trunk/jython/ast/astview.py Modified: trunk/jython/ast/astview.py =================================================================== --- trunk/jython/ast/astview.py 2009-01-14 04:35:22 UTC (rev 5929) +++ trunk/jython/ast/astview.py 2009-01-14 14:09:58 UTC (rev 5930) @@ -10,7 +10,7 @@ """ -import ast +import _ast import sys if sys.platform.startswith('java'): @@ -49,7 +49,7 @@ children = [child] for node in children: - if isinstance(node, ast.AST): + if isinstance(node, _ast.AST): yield lispify_ast(node) else: if isinstance(node, float): @@ -64,7 +64,7 @@ def tree(pyfile): try: - node = compile(open(pyfile).read(), pyfile, "exec", ast.PyCF_ONLY_AST) + node = compile(open(pyfile).read(), pyfile, "exec", _ast.PyCF_ONLY_AST) except SyntaxError: return "SyntaxError", return lispify_ast(node) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |