Revert "remove .py"

This reverts commit 352925b1c4.
master
mutantmonkey 2011-09-08 09:38:26 -04:00
parent 352925b1c4
commit 96e015d6ed
1 changed files with 9 additions and 0 deletions

View File

@ -91,6 +91,15 @@ def c(phenny, input):
c.commands = ['c']
c.example = '.c 5 + 3'
def py(phenny, input):
query = input.group(2).encode('utf-8')
uri = 'http://tumbolia.appspot.com/py/'
answer = web.get(uri + web.urllib.quote(query))
if answer:
phenny.say(answer)
else: phenny.reply('Sorry, no result.')
py.commands = ['py']
def wa(phenny, input):
if not input.group(2):
return phenny.reply("No search term.")