def complete_command(text):
 global rline_mpstate
 return rline_mpstate.command_map.keys()

def complete_command ( text ) : global rline_mpstate return rline_mpstate . command_map . keys ( )
returns a list of valid commands starting with the first argument .