Skip to content

Commit 11a7c0c

Browse files
authored
Updated to Python 3
Removed top #!/usr/bin/python3 changed all raw_inputs to input added parenthesis to print function
1 parent c90eb3d commit 11a7c0c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

GroupSms_Way2.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
#!/usr/bin/python
2-
31
import urllib2
42
import cookielib
53
from getpass import getpass
64
import sys
75

8-
username = raw_input('Enter mobile number:')
6+
username = input('Enter mobile number:')
97
passwd = getpass()
10-
message = raw_input('Enter Message:')
8+
message = input('Enter Message:')
119
#Fill the list with Recipients
1210
x=raw_input('Enter Mobile numbers seperated with comma:')
1311
num=x.split(',')
@@ -27,7 +25,7 @@
2725
try:
2826
usock = opener.open(url, data)
2927
except IOError:
30-
print "Error while logging in."
28+
print("Error while logging in.")
3129
sys.exit(1)
3230

3331

@@ -41,7 +39,7 @@
4139
send_sms_data = 'ssaction=ss&Token='+jession_id+'&mobile='+number+'&message='+message+'&msgLen=136'
4240
sms_sent_page = opener.open(send_sms_url,send_sms_data)
4341
except IOError:
44-
print "Error while sending message"
42+
print("Error while sending message")
4543

4644
sys.exit(1)
4745
print "SMS has been sent."

0 commit comments

Comments
 (0)