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: