I have written a basic Python REPL in Java and it works like the Python console in a CMD/xterm window.
I would like to provide a richer experience, though, with: