fiddle bits
This commit is contained in:
parent
ffbb362d3c
commit
bfb3ce8138
@ -7,7 +7,8 @@ from code import InteractiveConsole
|
||||
import sys
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
mod = _hy_import_file(sys.argv[1], '__main__')
|
||||
sys.argv = sys.argv[1:]
|
||||
mod = _hy_import_file(sys.argv[0], '__main__')
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
@ -36,6 +36,7 @@ class MetaImporter(object):
|
||||
mod.__file__ = self.path
|
||||
mod.__name__ = name
|
||||
mod.__loader__ = self
|
||||
mod.__package__ = name.rpartition('.')[0]
|
||||
sys.modules[name] = mod
|
||||
|
||||
return sys.modules[name]
|
||||
|
Loading…
x
Reference in New Issue
Block a user