Skip to content

Instantly share code, notes, and snippets.

@kvarga
Created August 7, 2013 00:12
Show Gist options
  • Save kvarga/6170111 to your computer and use it in GitHub Desktop.
Save kvarga/6170111 to your computer and use it in GitHub Desktop.
print interactive python prompt input history oneliner
import readline;print('\n'.join(readline.get_history_item(i) for i in range(readline.get_current_history_length()) if readline.get_history_item(i) is not None ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment