hy/bin/hython

24 lines
567 B
Plaintext
Raw Normal View History

2012-12-19 01:02:50 +01:00
#!/usr/bin/env python
2012-12-19 01:24:10 +01:00
# -*- coding: utf-8 -*-
2012-12-19 01:02:50 +01:00
from hy.lang.importer import _hy_import_file
2012-12-19 01:24:10 +01:00
from code import InteractiveConsole
2012-12-19 01:02:50 +01:00
import sys
2012-12-19 01:24:10 +01:00
if len(sys.argv) > 1:
2012-12-19 05:44:44 +01:00
sys.argv = sys.argv[1:]
mod = _hy_import_file(sys.argv[0], '__main__')
2012-12-19 01:24:10 +01:00
sys.exit(0)
InteractiveConsole().interact(banner="""
"Really, if the lower orders dont set us a good example, what on
earth is the use of them?"
-- Oscar Wilde (The Importance of Being Earnest)
The hython bits have been loaded -- magically, .hy
files are importable!""")