Example #1
0
 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
Example #2
0
def list_commands():
    commands = pycmds.suggest('')
    html = ''
    for command in commands:
        html += '<pre>' + command + '</pre>'
    return html