Browse Source

corrected the try - import statement

MalcolmMielle 5 years ago
parent
commit
e2c85047ce
1 changed files with 10 additions and 8 deletions
  1. 10
    8
      emails_sms_free.py

+ 10
- 8
emails_sms_free.py View File

@@ -3,16 +3,18 @@
3 3
 
4 4
 from __future__ import print_function #print function python 2 and 3 compatible
5 5
 
6
+import email
7
+import hashlib
8
+import imaplib
9
+import os.path
10
+import requests
11
+import sys
12
+import time
13
+
14
+#This is used to import library depending on the python version used.
6 15
 try:
7
-    #import urllib.request as urllib_request #for python 3
8
-	import email
9
-	import hashlib
10
-	import imaplib
16
+	#import urllib.request as urllib_request #for python 3
11 17
 	import json
12
-	import os.path
13
-	import requests
14
-	import sys
15
-	import time
16 18
 except ImportError:
17 19
 	#import urllib2 as urllib_request # for python 2
18 20
 	import simplejson as json