From 96e015d6ed8ee4d6ecf7337139dfcc51a1d79ae4 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Thu, 8 Sep 2011 09:38:26 -0400 Subject: [PATCH] Revert "remove .py" This reverts commit 352925b1c4ef009981aefb75d38781a1db72bdf3. --- modules/calc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/calc.py b/modules/calc.py index dbda9a3..9a5b187 100755 --- a/modules/calc.py +++ b/modules/calc.py @@ -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.")