python: Enable -m switch on gem5 binary (#453)
With -m, you can now run a module from the command line that is embedded in the gem5 binary. This will allow us to put some common "scripts" in the stdlib instead of in the "configs" directory.
This commit is contained in:
@@ -38,6 +38,9 @@ class ByteCodeLoader(importlib.abc.Loader):
|
||||
def exec_module(self, module):
|
||||
exec(self.code, module.__dict__)
|
||||
|
||||
def get_code(self, _):
|
||||
return self.code
|
||||
|
||||
|
||||
# Simple importer that allows python to import data from a dict of
|
||||
# code objects. The keys are the module path, and the items are the
|
||||
|
||||
Reference in New Issue
Block a user