mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-07 20:30:41 -05:00
[compat] Add compat_input
This commit is contained in:
parent
0fc832e1b2
commit
1ae6c83bce
1 changed files with 5 additions and 0 deletions
|
@ -482,6 +482,11 @@ def compat_getpass(prompt, *args, **kwargs):
|
||||||
else:
|
else:
|
||||||
compat_getpass = getpass.getpass
|
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
|
# Python < 2.6.5 require kwargs to be bytes
|
||||||
try:
|
try:
|
||||||
def _testfunc(x):
|
def _testfunc(x):
|
||||||
|
|
Loading…
Reference in a new issue