implement repl by python instead of vim script