From: James R E. <ea...@ba...> - 2007-01-27 18:33:44
|
On Jan 27, 2007, at 13:16 , Luca Cassioli wrote: > >>>> import javax.power.monitor.PowerMonitor >>>> pm = javax.power.monitor.PowerMonitor >>>> print pm.getBatteryLevel() > TypeError: > getBatteryLevel(): > expected 1 arg; not 0 pm is the PowerMonitor class, not an instance. You want: pm = javax.power.monitor.PowerMonitor() ^^ I'd suggest you take a look at the Python tutorial for Python 2.1: http://python.org/doc/2.1/tut/tut.html If you're already familiar with programming, its a quick and easy way to get up to speed with Python. Cheers! James -- Against stupidity the very Gods themselves contend in vain. |