Guest User

Untitled

a guest
Jan 17th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. import os
  2. import json
  3. import ast
  4. print('==============in python function========================')
  5. postreqdata = json.loads(open(os.environ['req']).read())
  6. response = open(os.environ['res'], 'w')
  7. response.write("hello world from "+postreqdata['name'])
  8. response.close()
  9. logic = (postreqdata['logic'])
  10. eval(logic)
  11.  
  12. 2018-01-17T07:07:39.556 ==============in python function========================
  13. 2018-01-17T07:07:39.618 Exception while executing function: Functions.ccfinopsRunModel. Microsoft.Azure.WebJobs.Script: Traceback (most recent call last):
  14. File "D:homesitewwwrootccfinopsRunModelrun.py", line 12, in <module>
  15. eval(logic)
  16. File "<string>", line 1
  17. print('code sent from client alpha1')
  18. ^
  19. SyntaxError: invalid syntax
  20.  
  21. {
  22. "name": "Python Function App",
  23. "logic": "print('code sent from client alpha1')nprint('code sent from client alpha2')"
  24. }
Add Comment
Please, Sign In to add comment