249 url = 'http://eval.appspot.com/eval?statement=' + urllib.quote (args['command']) |
249 url = 'http://eval.appspot.com/eval?statement=' + urllib.quote (args['command']) |
250 result = utility.read_url (url).splitlines() |
250 result = utility.read_url (url).splitlines() |
251 |
251 |
252 # \x0f is the 'reset colors' code, prepended to all reply lines to prevent other bots from |
252 # \x0f is the 'reset colors' code, prepended to all reply lines to prevent other bots from |
253 # reacting to this .py call. |
253 # reacting to this .py call. |
254 |
|
255 if result[0] == 'Traceback (most recent call last):': |
254 if result[0] == 'Traceback (most recent call last):': |
256 reply ('\x0f' + result[-1]) |
255 reply ('\x0f' + result[-1]) |
257 else: |
256 else: |
258 for line in result: |
257 for line in result: |
259 reply ('\x0f' + line) |
258 reply ('\x0f' + line) |