Last active
August 29, 2015 13:57
-
-
Save photonxp/9907408 to your computer and use it in GitHub Desktop.
This file contains 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
A nice way to judge python version by import statement: | |
https://github.com/facebook/tornado/blob/master/tornado/web.py | |
try: | |
from io import BytesIO # python 3 | |
except ImportError: | |
from cStringIO import StringIO as BytesIO # python 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment