rabin 7 years ago
parent
commit
05fb93dea4
1 changed files with 7 additions and 0 deletions
  1. 7 0
      core.py

+ 7 - 0
core.py

@@ -228,6 +228,13 @@ class Demeter(object):
 			return True
 		return False
 
+	@staticmethod
+	def exp(exp, value):
+		if exp:
+			exp = exp.replace('{n}', value)
+			value = str(eval(exp))
+		return value
+
 	@classmethod
 	def error(self, string):
 		if self.request: