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 <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62671
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Jason Lowe-Power
2022-08-25 09:26:49 -07:00
committed by Jason Lowe-Power
parent c8031233e8
commit c3e21ceac4

View File

@@ -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)