Commit 8ba5a334 authored by Woude, Auke van der's avatar Woude, Auke van der
Browse files

Introducted possibility to add simple arithmatic to rc files

parent 39acbed3
......@@ -835,6 +835,12 @@ class RcFile(object) :
raise Exception
#endif
else :
if do_eval:
print(val)
if isinstance(val, str):
if any(operator in val for operator in '+-*/'):
try: val = eval(val)
except: pass
# store new value:
self.values[key] = val
self.sources[key] = linetrace
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment