def _parse_response(self, result_page):
        """
        Takes a result page of sending the sms, returns an extracted tuple:
            ('numeric_err_code', '<sent_queued_message_id>', '<smsglobalmsgid>')
        Returns None if unable to extract info from result_page, it should be
        safe to assume that it was either a failed result or worse, the interface
        contract has changed.
        """
        # Sample result_page, single line -> "OK: 0; Sent queued message ID: 2063619577732703 SMSGlobalMsgID:6171799108850954"
        resultline = result_page.splitlines()[0] # get result line
        if resultline.startswith('ERROR:'):
            raise Exception(resultline.replace('ERROR: ', ''))
        patt = re.compile(r'^.+?:\s*(.+?)\s*;\s*Sent queued message ID:\s*(.+?)\s*SMSGlobalMsgID:(.+?)$', re.IGNORECASE)
        m = patt.match(resultline)
        if m:
            return (m.group(1), m.group(2), m.group(3)) 
        return None
def _parse_response ( self , result_page ) : resultline = result_page . splitlines ( ) [ 0 ] if resultline . startswith ( 'ERROR:' ) : raise Exception ( resultline . replace ( 'ERROR: ' , '' ) ) patt = re . compile ( r'^.+?:\s*(.+?)\s*;\s*Sent queued message ID:\s*(.+?)\s*SMSGlobalMsgID:(.+?)$' , re . IGNORECASE ) m = patt . match ( resultline ) if m : return ( m . group ( 1 ) , m . group ( 2 ) , m . group ( 3 ) ) return None
Takes a result page of sending the sms, returns an extracted tuple:
            ('numeric_err_code', '<sent_queued_message_id>', '<smsglobalmsgid>')
        Returns None if unable to extract info from result_page, it should be
        safe to assume that it was either a failed result or worse, the interface
        contract has changed.