corrected the try - import statement
This commit is contained in:
parent
543ebfbb89
commit
e2c85047ce
@ -3,16 +3,18 @@
|
|||||||
|
|
||||||
from __future__ import print_function #print function python 2 and 3 compatible
|
from __future__ import print_function #print function python 2 and 3 compatible
|
||||||
|
|
||||||
try:
|
|
||||||
#import urllib.request as urllib_request #for python 3
|
|
||||||
import email
|
import email
|
||||||
import hashlib
|
import hashlib
|
||||||
import imaplib
|
import imaplib
|
||||||
import json
|
|
||||||
import os.path
|
import os.path
|
||||||
import requests
|
import requests
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
#This is used to import library depending on the python version used.
|
||||||
|
try:
|
||||||
|
#import urllib.request as urllib_request #for python 3
|
||||||
|
import json
|
||||||
except ImportError:
|
except ImportError:
|
||||||
#import urllib2 as urllib_request # for python 2
|
#import urllib2 as urllib_request # for python 2
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
|
Loading…
Reference in New Issue
Block a user