Hi guys :

Any help with this please!

script1.py in 192.168.1.10
x = 10
script2.py in 192.168.1.20
if x == 10:
print x
else:
print "sorry"

how can apply this between two scripts in same network.

Thanks for all

I mean when I executed script1.py which contain json-rpc command to execute script2.py in network but I want to send x value with it..this is how to do it?

script1.py has this also:

import json

headers = {
    'Content-Type': 'application/json',
}

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

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

and I want to add x = 10 in script1.py and send it to script2.py in 192.168.1.20

Thanks for all

Can I do it with udpsocket ?

commented: Can't see why not. +15
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.