Created
July 12, 2015 13:05
-
-
Save ksc91u/c3c872679654ec9ebed4 to your computer and use it in GitHub Desktop.
Python 3/Python 2 urllib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IS_PYTHON_3=False | |
try: | |
import urllib.request as urllib2 | |
IS_PYTHON_3=True | |
except ImportError: | |
IS_PYTHON_3=False | |
import urllib2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment