Moving to astor.codegen

This commit is contained in:
Paul R. Tagliamonte 2013-03-11 21:12:38 -04:00
parent cdffc9d9d1
commit 10b887bbc8
4 changed files with 7 additions and 6 deletions

View File

@ -2,7 +2,7 @@
from hy.importer import (import_file_to_ast, import_file_to_module,
import_file_to_hst)
import codegen
import astor.codegen
import sys
import ast
@ -17,6 +17,6 @@ print ""
print ast.dump(_ast)
print ""
print ""
print codegen.to_source(_ast)
print astor.codegen.to_source(_ast)
import_file_to_module("<STDIN>", sys.argv[1])

View File

@ -1,5 +1,5 @@
tox
nose
astor
flake8
codegen
coverage

View File

@ -1,4 +1,4 @@
flask
astor
pygments
codegen
autopep8

View File

@ -11,7 +11,7 @@
(import-from hy.importer import_string_to_ast)
(import autopep8)
(import codegen)
(import astor.codegen)
(def app (Flask "__main__")) ; long story, needed hack
@ -19,7 +19,8 @@
(defn hy-to-py [hython]
(.fix-string autopep8 (.to_source codegen (import-string-to-ast hython))))
(.fix-string autopep8
(.to_source astor.codegen (import-string-to-ast hython))))
(defn err [msg] (make-response msg 500))