Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @cherrypy.expose
- @cherrypy.tools.json_out()
- @cherrypy.tools.json_in()
- def api(self):
- jsonIn = cherrypy.request.json
- print (jsonIn['method'])
- method = jsonIn['method'][0:16]
- method = re.sub(r'[^a-zA-Z0-9]','',method)
- method = 'SSAPI_' + method
- f = eval('self.' + method)
- f(jsonIn)
- def SSAPI_test(self, params):
- print (params)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement