Skip to content

Instantly share code, notes, and snippets.

@doegox
Created March 15, 2009 16:25
Show Gist options
  • Save doegox/79465 to your computer and use it in GitHub Desktop.
Save doegox/79465 to your computer and use it in GitHub Desktop.
Forces interactive mode with autocompletion
def set_interactive():
"""Forces interactive mode with autocompletion"""
print "<<< Autocompletion was turned on"
# Prepare autocompletion mode (rlcompleter is not used per se,.
# just for initialisation but that's the way it works)
import rlcompleter, readline
readline.parse_and_bind('tab: complete')
# Force interactive mode
os.environ['PYTHONINSPECT'] = '1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment