projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70497d6
)
python: use ipython in --interactive if it is available
author
Nathan Binkert
<nate@binkert.org>
Tue, 15 Jun 2010 06:24:46 +0000
(23:24 -0700)
committer
Nathan Binkert
<nate@binkert.org>
Tue, 15 Jun 2010 06:24:46 +0000
(23:24 -0700)
src/python/m5/main.py
patch
|
blob
|
history
diff --git
a/src/python/m5/main.py
b/src/python/m5/main.py
index fd58ce5005f7fb9bf3534bcecde7f657373bd867..cd139ccb39a723f433ec3df8d6b4ca37e32485d8 100644
(file)
--- a/
src/python/m5/main.py
+++ b/
src/python/m5/main.py
@@
-360,8
+360,13
@@
def main():
# once the script is done
if options.interactive:
- interact = code.InteractiveConsole(scope)
- interact.interact("M5 Interactive Console")
+ banner = "M5 Interactive Console"
+ try:
+ from IPython.Shell import IPShellEmbed
+ ipshell = IPShellEmbed(banner=banner,user_ns=scope)
+ ipshell()
+ except ImportError:
+ code.InteractiveConsole(scope).interact(banner)
if __name__ == '__main__':
from pprint import pprint