use readline.set_completion_display_matches_hook to set the display function.
Here's a quick-and-dirty example that just pipes all matches through column
to format them in columns and uses less
to display.
import readline
import subprocess
import rlcompleter
def display_matches(substitutions, matches, longest_match_length):
m = '\n'.join(matches) + '\n'
proc = subprocess.Popen('column | less', shell=True, stdin=subprocess.PIPE)
# python2:
proc.communicate(m)
# python3:
# proc.communicate(m.encode('utf-8'))
readline.set_completion_display_matches_hook(display_matches)
readline.parse_and_bind('tab: complete')