A python REPL task.

Also, changes to scala REPL to match functionality.

Also, integration tests for both.