#!/usr/bin/python #This is an example file how batocera-settings-get can be utilized #to read a value out from /userdata/system/batocera.conf with python import subprocess command=(["batocera-settings-get", "system.power.switch"]) rc = subprocess.call(command, stdout=subprocess.DEVNULL) if rc == 0: value = subprocess.check_output(command).decode("utf-8") print ("Power Switch Detected: ", value) else: print ("No power switch detected!")