mirror of
https://github.com/httpie/cli.git
synced 2025-02-21 20:10:48 +01:00
27 lines
542 B
Python
27 lines
542 B
Python
"""
|
|
Python 2/3 compatibility.
|
|
|
|
"""
|
|
#noinspection PyUnresolvedReferences
|
|
from requests.compat import (
|
|
is_windows,
|
|
bytes,
|
|
str,
|
|
is_py3,
|
|
is_py26,
|
|
)
|
|
|
|
try:
|
|
#noinspection PyUnresolvedReferences,PyCompatibility
|
|
from urllib.parse import urlsplit
|
|
except ImportError:
|
|
#noinspection PyUnresolvedReferences,PyCompatibility
|
|
from urlparse import urlsplit
|
|
|
|
try:
|
|
#noinspection PyCompatibility
|
|
from urllib.request import urlopen
|
|
except ImportError:
|
|
#noinspection PyCompatibility
|
|
from urllib2 import urlopen
|