This tutorial is now part of the prompt_toolkit mainline. Please check: https://github.com/jonathanslenders/python-prompt-toolkit/tree/master/examples/tutorial