changeset 72af7f65f117 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=72af7f65f117
description:
python: use ipython in --interactive if it is available
diffstat:
src/python/m5/main.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r 95160760db54 -r 72af7f65f117 src/python/m5/main.py
--- a/src/python/m5/main.py Mon Jun 14 23:24:45 2010 -0700
+++ b/src/python/m5/main.py Mon Jun 14 23:24:46 2010 -0700
@@ -360,8 +360,13 @@
# 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
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev