コード例 #1
0
 def calc(self, text):
     """based on the input text, return the int result"""
     try:
         print('In calculator')
         return real_calc(text)
     except Exception as e:
         return 0.0
コード例 #2
0
 def calc(self, num1, num2):
     """based on the input text, return the int result"""
     try:
         return real_calc(num1, num2)
     except Exception as e:
         print(e)
         return "100"
コード例 #3
0
 def resolve_calc(self, info, signingkey, math):
     """based on the input text, return the int result"""
     if signingkey != apiSigningKey:
         return "invalid signature"
     try:
         return real_calc(math)
     except Exception:
         return 0.0
コード例 #4
0
 def resolve_calc(self, info, math):
     """based on the input text, return the int result"""
     try:
         return real_calc(math)
     except Exception:
         return 0.0
コード例 #5
0
ファイル: api.py プロジェクト: fyears/electron-python-example
 def calc(self, text):
     """based on the input text, return the int result"""
     try:
         return real_calc(text)
     except Exception as e:
         return 0.0