Commit graph

29 commits

Author SHA1 Message Date
jesopo
0f1bf6ee22 force utf8 encoding on eval_python.py 2019-12-18 19:51:35 +00:00
jesopo
2d21dfa229 utils.http.Response.data should always be bytes - add .decode and .soup 2019-11-26 13:42:01 +00:00
jesopo
f8083ae7b4 switch to a better python eval API 2019-11-08 12:46:25 +00:00
jesopo
268c5adb3c Add depends-on hashflags to relevant modules 2019-05-25 21:40:06 +01:00
jesopo
8e5642f5d7 Check if page is null before trying to access page.data (eval_python.py) 2019-01-15 12:39:27 +00:00
jesopo
793d234a0b 'utils.http.get_url' -> 'utils.http.request', return a Response object from
utils.http.request
2018-12-11 22:26:38 +00:00
jesopo
a1e77c40e8 Give page an initial value of None, in case the get_url call fails in
modules/eval_python.py
2018-10-24 13:54:22 +01:00
jesopo
f89b96f373 Move taking a reference to sys.stdout above fail() in modules/eval_python.py 2018-10-24 13:54:03 +01:00
jesopo
46179d2f38 There's no self in eval_python's template! 2018-10-24 13:50:50 +01:00
jesopo
7f9399a925 Specifically catch SyntaxError in modules/eval_python.py 2018-10-24 13:43:34 +01:00
jesopo
99f896ebdd Catch syntax errors with .py/.py2 2018-10-24 13:40:56 +01:00
jesopo
dd93a84f80 Put .strip("\n") call in the right place in modules/eval_python.py 2018-10-17 17:31:59 +01:00
jesopo
69f9aab4b9 Refer to out["out"], not just out, to get the output from eval 2018-10-17 15:11:05 +01:00
jesopo
10d403d24a Import json in modules/eval_python.py 2018-10-17 15:09:59 +01:00
jesopo
cfb9fa1c2e import json in EVAL_TEMPLATE and json parse response from eval api 2018-10-17 15:08:48 +01:00
jesopo
ecb2b1331a 'import StringIO' -> 'import io' in modules/eval_python.py 2018-10-17 15:06:54 +01:00
jesopo
f08624ddbd Escape \n in EVAL_TEMPLATE in modules/eval_python.py 2018-10-17 15:04:38 +01:00
jesopo
baa039e86d Add missing ":"s in EVAL_TEMPLATE in modules/eval_python.py 2018-10-17 15:03:41 +01:00
jesopo
3d34896beb Better handling of eval errors in modules/eval_python.py 2018-10-17 15:02:04 +01:00
jesopo
11944e348b Remove additional ")"s in modules/eval_python.py 2018-10-17 14:32:01 +01:00
jesopo
34c13c7916 html.unescape output in modules/eval_python.py 2018-10-17 14:30:59 +01:00
jesopo
8eb5c11979 ' -> " in modules/eval_python.py 2018-10-12 13:23:54 +01:00
jesopo
c66b376e7f Use compile+eval to support statements and expressions 2018-10-12 13:18:06 +01:00
jesopo
4700402db4 Add a \n between potential prints in eval() and printing the return from eval so
that bitbot will only show one of them
2018-10-12 12:46:05 +01:00
jesopo
b884b0e170 Support py2 and py3 in eval_python 2018-10-12 12:39:01 +01:00
jesopo
b2dd75d68f Use a more reliable API for evaling python 2018-10-12 11:56:13 +01:00
jesopo
a9202a6abf Add !py as an alias of !python in modules/eval_python.py 2018-10-11 13:32:28 +01:00
jesopo
de2a390d92 !eval -> !python in modules/eval_python.py 2018-10-08 12:51:04 +01:00
jesopo
b462ac265e eval.py -> eval_python.py, rust_eval.py -> eval_rust.py 2018-10-08 12:47:48 +01:00
Renamed from modules/eval.py (Browse further)