Source: https://gist.github.com/4162427
Simple script to open the SMS compose screen (it plays well with Launch Center Pro)
Use it as a custom URL action:
pythonista://simplesms?action=run&args='tel={tel}&body={msg}'
Where {tel}: Phone to send SMS
{body}: Message to send
Warning: As the iOS doesn't allow to send SMS directly, the script will open the compose screen
Warning 2: iOS doesn't support the message to be passed by url scheme only programmaticaly, so when the SMS screen is opeoned you will have to paste the clipboard contents to the SMS itself.
Hey developers, it is possible for a future version include some python binding for the objective-c code below to make it possible prepopulate the text os the SMS
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
picker.messageComposeDelegate = self;
picker.recipients = [NSArray arrayWithObject:@"48151623"];
picker.body = @"Body text.";
[self presentModalViewController:picker animated:YES];
[picker release];