summaryrefslogtreecommitdiff
path: root/src/python/m5/config.py
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-05-30 13:11:34 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2006-05-30 13:11:34 -0400
commit0337db3388db335ea23f02f3aa00bca9d483ef1c (patch)
tree8293d1d4e9520acabde7e37bd0a065467147ba87 /src/python/m5/config.py
parentd308055afc1ace1f321b76e8a85a9a45165da2ce (diff)
downloadgem5-0337db3388db335ea23f02f3aa00bca9d483ef1c.tar.xz
Link in Python interpreter.
Use embedded zip archive to carry Python code instead of homegrown embedded string/file mechanism. Do argument parsing in Python instead of C++. SConstruct: Add Python interpreter include path & library. Define two new simple builders which copy & concatenate files, respectively, for use by the Python embedded zipfile code. src/SConscript: Encapsulate environment creation in a function. Add code to append Python zip archive to final executable. Eliminate references to obsolete files. src/python/SConscript: Rewrite to generate embedded zip archive of Python code (replacing old "embedded string" mechanism). src/python/m5/__init__.py: Move main arg-parsing loop here (out of C++ main()). src/python/m5/config.py: Minor fix (version incompatibility?). src/sim/main.cc: Invoke embedded Python interpreter to parse args and generate config.ini, replacing C++ arg parsing code. --HG-- extra : convert_revision : 72d21236b2bee139ff39ba4cf031a4a1f8560029
Diffstat (limited to 'src/python/m5/config.py')
-rw-r--r--src/python/m5/config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/m5/config.py b/src/python/m5/config.py
index 1e25e0d09..ce7e5a964 100644
--- a/src/python/m5/config.py
+++ b/src/python/m5/config.py
@@ -794,7 +794,7 @@ class ParamFactory(object):
# E.g., Param.Int(5, "number of widgets")
def __call__(self, *args, **kwargs):
- caller_frame = inspect.stack()[1][0]
+ caller_frame = inspect.currentframe().f_back
ptype = None
try:
ptype = eval(self.ptype_str,