From d0a726d66df5f424cdf8de2477d4fb67ec648f38 Mon Sep 17 00:00:00 2001 From: vunhat_minh Date: Fri, 27 Jun 2014 16:45:04 +0900 Subject: [PATCH] eval function --- rainbowstream/rainbow.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index 77621a7..d98d1e0 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -1086,6 +1086,10 @@ def reset(): if g['reset']: printNicely(magenta('Need tips ? Type "h" and hit Enter key!')) g['reset'] = False + try: + print eval(g['cmd']) + except: + pass def process(cmd): @@ -1180,6 +1184,7 @@ def listen(): cmd = line.split()[0] except: cmd = '' + g['cmd'] = cmd # Save cmd to global variable and call process try: g['stuff'] = ' '.join(line.split()[1:]) -- 2.25.1