2013-03-05 18:16:04 -05:00
|
|
|
#!/usr/bin/env python
|
2013-04-09 15:23:50 -04:00
|
|
|
from __future__ import print_function
|
2013-03-05 18:16:04 -05:00
|
|
|
|
2013-03-08 18:18:43 -05:00
|
|
|
from hy.importer import (import_file_to_ast, import_file_to_module,
|
|
|
|
import_file_to_hst)
|
2013-04-10 16:52:28 -04:00
|
|
|
from hy.util import dump
|
|
|
|
|
2013-04-09 15:23:50 -04:00
|
|
|
#import astor.codegen
|
2013-03-05 18:16:04 -05:00
|
|
|
import sys
|
2013-03-05 21:42:54 -05:00
|
|
|
import ast
|
2013-03-05 18:16:04 -05:00
|
|
|
|
2013-03-08 18:18:43 -05:00
|
|
|
|
|
|
|
hst = import_file_to_hst(sys.argv[1])
|
2013-04-09 15:23:50 -04:00
|
|
|
print(hst)
|
|
|
|
print("")
|
|
|
|
print("")
|
2013-03-08 18:18:43 -05:00
|
|
|
_ast = import_file_to_ast(sys.argv[1])
|
2013-04-09 15:23:50 -04:00
|
|
|
print("")
|
|
|
|
print("")
|
2013-04-10 16:52:28 -04:00
|
|
|
print(dump(_ast))
|
2013-04-09 15:23:50 -04:00
|
|
|
print("")
|
|
|
|
print("")
|
|
|
|
#print(astor.codegen.to_source(_ast))
|
2013-03-08 23:41:04 -05:00
|
|
|
|
|
|
|
import_file_to_module("<STDIN>", sys.argv[1])
|