1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/usr/bin/env python
import gammu
import sys
# Global debug level
gammu.SetDebugFile(sys.stderr)
gammu.SetDebugLevel('textall')
sm = gammu.StateMachine()
sm.ReadConfig()
# Use global debug stub regardless configuration
c = sm.GetConfig(0)
c['UseGlobalDebugFile'] = True
sm.SetConfig(0, c)
sm.Init()
Manufacturer = sm.GetManufacturer()
Model = sm.GetModel()
IMEI = sm.GetIMEI()
Firmware = sm.GetFirmware()
print _('Phone infomation:')
print '%-15s: %s' % (_('Manufacturer'), Manufacturer)
print '%-15s: %s (%s)' % (_('Model'), Model[0], Model[1])
print '%-15s: %s' % (_('IMEI'), IMEI)
print '%-15s: %s' % (_('Firmware'), Firmware[0])
|