Added utf8 for accent in print and a test file

This commit is contained in:
MalcolmMielle 2014-11-04 12:58:50 +01:00
parent 25b8db512f
commit 0fe65f4b4d
3 changed files with 14 additions and 2 deletions

0
__init__.py Normal file
View File

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding:utf-8-*-
import email import email
import hashlib import hashlib
@ -53,7 +54,6 @@ def send(url, user, password, msg, i=0):
def get_emails(imap_server, imap_user, imap_password, inbox, uid): def get_emails(imap_server, imap_user, imap_password, inbox, uid):
global msg_ids global msg_ids
print('Connecting to '+imap_server+'', end=' ') print('Connecting to '+imap_server+'', end=' ')
conn = imaplib.IMAP4_SSL(imap_server) conn = imaplib.IMAP4_SSL(imap_server)
print('Connected') print('Connected')

12
test.py Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env python3
import emails_sms_free
if __name__ == '__main__':
url = "https://smsapi.free-mobile.fr/sendmsg"
user= raw_input("Please enter usr: ")
print "you entered", user
password= raw_input("Please enter password: ")
print "you entered", password
msg = raw_input("Please enter msg: ")
print "you entered", msg
send(url, user, password, msg, 1)