#!/usr/bin/python # -*- coding: utf-8 -*- #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 value = (subprocess.check_output(['batocera-settings-get', 'power.switch.device'])) if value: print "Power Switch Detected: ", value else: print "No power switch detected!"