Python with json-rpc integration

Hi guys,

I have two python files:

script1.py

 import json

 headers = {

 'Content-Type': 'application/json',

  }



   data =  '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params": 
    {"vlaue":1199,"addonid":"script.activatewindowid"},"id":1}'



      response = requests.post('http://192.168.15.200:8080/jsonrpc', headers=headers, data=data, auth= 
       ('user', '1234'))

script2.py

     import json

   json_string = 'what is the function here to take value parameter from json?'

   parsed_data = json.loads(json_string)

   x = parsed_data["value"]

  if x == "1199":

   xbmc.executebuiltin('ActivateWindow(9000)')

    else:

     xbmc.executebuiltin('ActivateWindow(1199)')

What is my function I have to put it in script2.py to get the value data from script1.py?

Thanks for all

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.