Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import json
- import ast
- print('==============in python function========================')
- postreqdata = json.loads(open(os.environ['req']).read())
- response = open(os.environ['res'], 'w')
- response.write("hello world from "+postreqdata['name'])
- response.close()
- logic = (postreqdata['logic'])
- eval(logic)
- 2018-01-17T07:07:39.556 ==============in python function========================
- 2018-01-17T07:07:39.618 Exception while executing function: Functions.ccfinopsRunModel. Microsoft.Azure.WebJobs.Script: Traceback (most recent call last):
- File "D:homesitewwwrootccfinopsRunModelrun.py", line 12, in <module>
- eval(logic)
- File "<string>", line 1
- print('code sent from client alpha1')
- ^
- SyntaxError: invalid syntax
- {
- "name": "Python Function App",
- "logic": "print('code sent from client alpha1')nprint('code sent from client alpha2')"
- }
Add Comment
Please, Sign In to add comment