2013-03-22 00:27:34 +01:00
|
|
|
import hy # NOQA
|
2013-03-19 05:58:43 +01:00
|
|
|
import imp
|
|
|
|
import sys
|
|
|
|
|
2013-03-22 00:27:34 +01:00
|
|
|
# This just mocks the normalish behavior of the Python interp. Helpful to aid
|
2014-05-02 17:58:42 +02:00
|
|
|
# with shimming existing apps that don't really "work" with Hy.
|
2013-03-22 00:27:34 +01:00
|
|
|
#
|
|
|
|
# You could say this script helps Hyjack a file.
|
|
|
|
#
|
2013-03-19 05:58:43 +01:00
|
|
|
|
2013-03-29 03:42:53 +01:00
|
|
|
|
2013-03-19 05:58:43 +01:00
|
|
|
if len(sys.argv) > 1:
|
|
|
|
sys.argv.pop(0)
|
2019-07-08 02:28:12 +02:00
|
|
|
hy.importer._import_from_path('__main__', sys.argv[0])
|
2013-03-19 05:58:43 +01:00
|
|
|
sys.exit(0) # right?
|