Check the percentage of the computer's battery

some code in python - Getting Battery Capacity in Windows with Python - Stack Overflow -