/
usr
/
lib
/
python2.7
/
site-packages
/
requests
/
/usr/lib/python2.7/site-packages/requests
mkdir
upload
Name
Size
Mode
Actions
adapters.py
21344
0644
edit
dl
rm
adapters.pyc
19088
0644
edit
dl
rm
adapters.pyo
19088
0644
edit
dl
rm
api.py
6253
0644
edit
dl
rm
api.pyc
6968
0644
edit
dl
rm
api.pyo
6968
0644
edit
dl
rm
auth.py
10206
0644
edit
dl
rm
auth.pyc
10224
0644
edit
dl
rm
auth.pyo
10224
0644
edit
dl
rm
certs.py
709
0644
edit
dl
rm
certs.pyc
979
0644
edit
dl
rm
certs.pyo
979
0644
edit
dl
rm
compat.py
1678
0644
edit
dl
rm
compat.pyc
1987
0644
edit
dl
rm
compat.pyo
1987
0644
edit
dl
rm
cookies.py
18430
0644
edit
dl
rm
cookies.pyc
22049
0644
edit
dl
rm
cookies.pyo
22049
0644
edit
dl
rm
exceptions.py
3185
0644
edit
dl
rm
exceptions.pyc
6858
0644
edit
dl
rm
exceptions.pyo
6858
0644
edit
dl
rm
help.py
3515
0644
edit
dl
rm
help.pyc
3266
0644
edit
dl
rm
help.pyo
3266
0644
edit
dl
rm
hooks.py
757
0644
edit
dl
rm
hooks.pyc
1162
0644
edit
dl
rm
hooks.pyo
1162
0644
edit
dl
rm
models.py
34209
0644
edit
dl
rm
models.pyc
28710
0644
edit
dl
rm
models.pyo
28710
0644
edit
dl
rm
packages.py
542
0644
edit
dl
rm
packages.pyc
459
0644
edit
dl
rm
packages.pyo
459
0644
edit
dl
rm
sessions.py
29525
0644
edit
dl
rm
sessions.pyc
22479
0644
edit
dl
rm
sessions.pyo
22479
0644
edit
dl
rm
status_codes.py
4129
0644
edit
dl
rm
status_codes.pyc
5982
0644
edit
dl
rm
status_codes.pyo
5982
0644
edit
dl
rm
structures.py
2981
0644
edit
dl
rm
structures.pyc
5160
0644
edit
dl
rm
structures.pyo
5160
0644
edit
dl
rm
utils.py
30038
0644
edit
dl
rm
utils.pyc
26858
0644
edit
dl
rm
utils.pyo
26858
0644
edit
dl
rm
_internal_utils.py
1096
0644
edit
dl
rm
_internal_utils.pyc
1499
0644
edit
dl
rm
_internal_utils.pyo
1447
0644
edit
dl
rm
__init__.py
3608
0644
edit
dl
rm
__init__.pyc
3799
0644
edit
dl
rm
__init__.pyo
3630
0644
edit
dl
rm
__version__.py
436
0644
edit
dl
rm
__version__.pyc
575
0644
edit
dl
rm
__version__.pyo
575
0644
edit
dl
rm
Edit:
/usr/lib/python2.7/site-packages/requests/_internal_utils.py
(1096B)
# -*- coding: utf-8 -*- """ requests._internal_utils ~~~~~~~~~~~~~~ Provides utility functions that are consumed internally by Requests which depend on extremely few external helpers (such as compat) """ from .compat import is_py2, builtin_str, str def to_native_string(string, encoding='ascii'): """Given a string object, regardless of type, returns a representation of that string in the native string type, encoding and decoding where necessary. This assumes ASCII unless told otherwise. """ if isinstance(string, builtin_str): out = string else: if is_py2: out = string.encode(encoding) else: out = string.decode(encoding) return out def unicode_is_ascii(u_string): """Determine if unicode string only contains ASCII characters. :param str u_string: unicode string to check. Must be unicode and not Python 2 `str`. :rtype: bool """ assert isinstance(u_string, str) try: u_string.encode('ascii') return True except UnicodeEncodeError: return False
Save
cmd:
run