Python you could have done:
Code:
import commands
def CheckBattery():
return commands.getstatusoutput("sysctl hw.acpi.battery.life")[1].split(:)[1]
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
|