DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

New Sysinfo Module

06.09.2005
| 4741 views |
  • submit to reddit
        In the 1.1.0 release of python series 60, the sysinfo module 
provides some useful information
from sysinfo import *

level = battery()  # from 0 to 7
sig = signal() # signal strength 0-7

width, height = displaypixels() # 176, 208
free_space = drive_free()['C:'] # 'E:' for memcard

imei_num = imei()  # can be used as ID
osversion() # (major, minor, build)
swversion() # "V 3.42.1 16-10-03 NHL-10 (c) NMP"