[Tutor] SMS to Python

Alan Gauld alan.gauld at btinternet.com
Tue May 22 18:49:17 CEST 2007

"Smith, Jeff" <jsmith at medplus.com> wrote

FWIW. Here's the BT SDK sample SMS code...

from datetime import datetime
import sys
import btsdk

def send_sms(sender, messageText, recipients):
    server = btsdk.services.Messaging()
    resp = server.sendMessage(recipients, sender, sender, messageText)
    return resp

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print "Usage %s sender recipient" % sys.argv[0]
    messageText = "The time is %s." % 
    print sys.argv[1:]
    send_sms(sys.argv[1], messageText, sys.argv[2:])
HTHAlan G. 

More information about the Tutor mailing list