Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
phone:gammu_send_sms [2011/05/29 20:24]
flozz [Send SMS from the command line]
phone:gammu_send_sms [2011/06/07 09:56]
flozz [Send SMS using Python]
Line 21: Line 21:
 FIXME FIXME
  
 +<code python sendsms.py>​
 +#​!/​usr/​bin/​python
 +# -*- coding: UTF-8 -*-
  
 +
 +import gammu
 +
 +
 +gamu_sm = gammu.StateMachine()
 +gamu_sm.ReadConfig() ​             #Read the default config file (~/​.gammurc)
 +gamu_sm.Init() ​                   #Connect to the phone
 +
 +gamu_sm.SendSMS({ ​                #Send the SMS
 +        '​Class':​ 1,
 +        '​Text':​ "Hello World from my Python script :)",
 +        '​SMSC':​ {'​Location':​ 1},
 +        '​Number':​ "​+336xxxxxxxx",​
 +        })
 +
 +</​code>​
 ===== EXAMPLE: A simple Python application with a GTK2 GUI ===== ===== EXAMPLE: A simple Python application with a GTK2 GUI =====
  
 FIXME FIXME
  
 
phone/gammu_send_sms.txt · Last modified: 2017/09/01 12:24 (external edit)