Skip to content

Instantly share code, notes, and snippets.

@jsdt
Created September 12, 2019 16:44
Show Gist options
  • Save jsdt/182a5e2f38e8037597a285bb4c9554ee to your computer and use it in GitHub Desktop.
Save jsdt/182a5e2f38e8037597a285bb4c9554ee to your computer and use it in GitHub Desktop.
Python shell
def start_repl():
import code
import readline
import rlcompleter
vars = globals()
vars.update(locals())
readline.set_completer(rlcompleter.Completer(vars).complete)
readline.parse_and_bind("tab: complete")
code.InteractiveConsole(vars).interact()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment