From c3e21ceac405d85bf9f49a238a99c8701e398d59 Mon Sep 17 00:00:00 2001 From: Jason Lowe-Power Date: Thu, 25 Aug 2022 09:26:49 -0700 Subject: [PATCH] python: Fix up arrow in interactive shell Simply by importing the readline module, the up arrow will work in gem5's interactive shell now. Change-Id: I41d87adc34253abf5a00ac484da377f9f065a27a Signed-off-by: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62671 Tested-by: kokoro Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce --- src/python/m5/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python/m5/main.py b/src/python/m5/main.py index 84145dfc38..49654ea93e 100644 --- a/src/python/m5/main.py +++ b/src/python/m5/main.py @@ -311,6 +311,8 @@ def interact(scope): else: # Use the Python shell in the standard library if IPython # isn't available. + import readline # if this is imported, then the up arrow works + code.InteractiveConsole(scope).interact(banner)