Last active
July 25, 2016 15:37
-
-
Save ricrogz/04431a7e2c371be220b2c760ffa31269 to your computer and use it in GitHub Desktop.
Python: history for input() method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import readline | |
""" | |
Just importing the 'readline' ('or 'gnureadline', as it has been renamed) package will do! | |
To add text completion: see here: https://pymotw.com/2/readline/ | |
""" | |
While True: | |
line = input().strip() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment