REPL. very first impl. lots from Python3.3.2 source