Ventures of an ex indie game developer

Programatically sending SMS

The SMS alert for the alarm wasn't as bad as I thought. I found Twilio, bought an account for the minimum $20 (they deduct $1 per month). They seem to charge about $0.18 per SMS. The code is a piece of pie:

Oh, and don't forget to escape your non-ASCII's (Swedish below):
char_xlat = list(zip('åäöÅÄÖ', [s+';' for s in 'åäöÅÄÖ'.split(';')]))
for ch,xlat in char_xlat:
 msg = msg.replace(ch, xlat)

About the author

Mitt foto
Gothenburg, Sweden