rabin 7 سال پیش
والد
کامیت
05fb93dea4
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  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: