@@ -36,7 +36,7 @@ How to encode a single part SMS ready to be sent::
3636 sms = SmsSubmit("+44123231231", "hey how's it going?")
3737 pdu = sms.to_pdu()[0]
3838
39- print pdu.length, pdu.pdu
39+ print( pdu.length, pdu.pdu)
4040
4141
4242How to encode a concatenated SMS ready to be sent::
@@ -45,7 +45,7 @@ How to encode a concatenated SMS ready to be sent::
4545
4646 sms = SmsSubmit("+44123231231", "hey " * 50)
4747 for pdu in sms.to_pdu():
48- print pdu.length, pdu.pdu
48+ print( pdu.length, pdu.pdu)
4949
5050
5151Setting class
@@ -59,7 +59,7 @@ Setting the SMS class (0-3) is a no brainer::
5959 sms.class = 0
6060 pdu = sms.to_pdu()[0]
6161
62- print pdu.length, pdu.pdu
62+ print( pdu.length, pdu.pdu)
6363
6464
6565Setting validity
@@ -78,7 +78,7 @@ Setting absolute validity::
7878 sms.validity = datetime(2010, 12, 31, 23, 59, 59)
7979 pdu = sms.to_pdu()[0]
8080
81- print pdu.length, pdu.pdu
81+ print( pdu.length, pdu.pdu)
8282
8383
8484Setting relative validity::
@@ -90,7 +90,7 @@ Setting relative validity::
9090 sms.validity = timedelta(hours=5)
9191 pdu = sms.to_pdu()[0]
9292
93- print pdu.length, pdu.pdu
93+ print( pdu.length, pdu.pdu)
9494
9595
9696Decoding
@@ -103,10 +103,10 @@ term:`PDU` decoding is really simple with :class:`~messaging.sms.SmsDeliver`::
103103 pdu = "0791447758100650040C914497726247010000909010711423400A2050EC468B81C4733A"
104104 sms = SmsDeliver(pdu)
105105
106- print sms.data
106+ print( sms.data)
107107 # {'csca': '+447785016005', 'type': None,
108108 # 'date': datetime.datetime(2009, 9, 1, 16, 41, 32),
109- # 'text': u ' 1741 bst', 'fmt': 0, 'pid': 0,
109+ # 'text': ' 1741 bst', 'fmt': 0, 'pid': 0,
110110 # 'dcs': 0, 'number': '+447927267410'}
111111
112112Apart from the pdu, the :py:meth: `messaging.sms.SmsDeliver.__init__ ` accepts a
@@ -135,7 +135,7 @@ registered::
135135 # prompt appears (a more robust implementation
136136 # would wait till the prompt appeared)
137137 ser.write('AT+CMGS=%d\r' % pdu.length)
138- print ser.readlines()
138+ print( ser.readlines() )
139139 # write the PDU and send a Ctrl+z escape
140140 ser.write('%s\x1a' % pdu.pdu)
141141 ser.close()
0 commit comments