Refactoring of repl.py (Splitted in repl.py and python_input.py)