diff options
author | Nathan Binkert <binkertn@umich.edu> | 2007-01-03 10:16:22 -0800 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2007-01-03 10:16:22 -0800 |
commit | e6b4fed75d8b1044835bfbef77934b9a47bb2680 (patch) | |
tree | 613832fad8228d549c5b0f98a7e788cd1a32c3a4 /src/python | |
parent | e9a395c2ce35bb0b46389ea3d73655e0bc824944 (diff) | |
download | gem5-e6b4fed75d8b1044835bfbef77934b9a47bb2680.tar.xz |
set __name__ in the root m5 script to __m5_main__ so we can
tell if the script is run from m5 as the m5 script
--HG--
extra : convert_revision : 06f646cbb8c82444ef345115aa49324a4d3a2c9f
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/m5/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/python/m5/main.py b/src/python/m5/main.py index 114c668a6..5df6d03cf 100644 --- a/src/python/m5/main.py +++ b/src/python/m5/main.py @@ -304,7 +304,8 @@ def main(): sys.argv = arguments sys.path = [ os.path.dirname(sys.argv[0]) ] + sys.path - scope = { '__file__' : sys.argv[0] } + scope = { '__file__' : sys.argv[0], + '__name__' : '__m5_main__' } # we want readline if we're doing anything interactive if options.interactive or options.pdb: |