Created
March 15, 2021 20:06
-
-
Save ILightThings/fcd7d045ce30698ffd182139e027ebe1 to your computer and use it in GitHub Desktop.
Revisions
-
ILightThings created this gist
Mar 15, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ import readline def rlinput(prefill): readline.set_startup_hook(lambda: readline.insert_text(prefill)) try: return input() # or raw_input in Python 2 finally: readline.set_startup_hook() query = "" while True: query = rlinput(query) print(f"The new line is: {query}")