def suggest(self, prefix): if CACHING: suggestions = memcache.get('suggest:' + prefix) if suggestions: return suggestions suggestions = pycmds.suggest(prefix) if CACHING: memcache.add('suggest:' + prefix, suggestions, time=6000) return suggestions
def list_commands(): commands = pycmds.suggest('') html = '' for command in commands: html += '<pre>' + command + '</pre>' return html