The rlcompleter module defines a completion function suitable for the readline module by completing valid Python identifiers and keywords.
import rlcompleter
import readline
readline.parse_and_bind("tab: complete")
readline. <TAB PRESSED>
readline.__doc__ readline.get_line_buffer readline.read_init_file
readline.__file__ readline.insert_text readline.set_completer
readline.__name__ readline.parse_and_bind
index
