Skip to content

Instantly share code, notes, and snippets.

@yamyamyuo
Created October 11, 2018 06:06
Show Gist options
  • Save yamyamyuo/66454ea69064db57accbd342fe9f7fe2 to your computer and use it in GitHub Desktop.
Save yamyamyuo/66454ea69064db57accbd342fe9f7fe2 to your computer and use it in GitHub Desktop.
python 2 and python 3 compatible
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
if sys.version_info >= (3, 0):
from urllib.parse import urlparse
else:
from urlparse import urlparse
import ConfigParser as config_parser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment