For windows look for WMI scripting queries that would fetch you the required info. You can use the same in the python. The Microsoft site has plenty of details on that.
For Ubuntu, you will have to look for the file which stores that info. It could be in /proc.
A google search for "Ubuntu + battery" gave me something called
Hope this helps...
Reputation Points: 10
Solved Threads: 6
Junior Poster in Training
Offline 52 posts
since Aug 2005