Add Python interactive readline support
Refactored raft.py after intern code review