Skip to content

Instantly share code, notes, and snippets.

@AMeng
Last active August 29, 2015 14:07
Show Gist options
  • Save AMeng/c22de910b3fbb3642aaa to your computer and use it in GitHub Desktop.
Save AMeng/c22de910b3fbb3642aaa to your computer and use it in GitHub Desktop.
import json
import sys
import os
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment