Jul-14-2019, 03:30 PM
Yes, the syntax error is because of the accent symbol. However, if you replace it with a quote to make it a string, that's going to cause problems with the other quotes within the string. You would need to escape those quotes:
hoek="curl -s \"http://127.0.0.1:8080/json.htm?type=devices&rid=59\" | jq '.result[0].Level'| tr -d '\"'"But that's going to cause other problems. That's a string, but you are passing it to SetAngle as if it's a number. It looks like a system command you would enter on the command line. Are you expecting Python to run it in the OS and get a response back? If so you need tell Python to do that, with something like os.popen. Although it looks like you are doing something with a local json file? You might want to look at the json module so you can parse the file directly.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures