[compat] Add compat_input

This commit is contained in:
Sergey M․ 2016-06-05 00:43:55 +07:00
parent 0fc832e1b2
commit 1ae6c83bce
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -482,6 +482,11 @@ def compat_getpass(prompt, *args, **kwargs):
else:
compat_getpass = getpass.getpass
try:
compat_input = raw_input
except NameError: # Python 3
compat_input = input
# Python < 2.6.5 require kwargs to be bytes
try:
def _testfunc(x):