prompt_toolkit

Table of Contents

Support command history(up-arrow reveals prev commands) howto

from prompt_toolkit import PromptSession

session = PromptSession()

while True:
    session.prompt()
To persist a history to disk