]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/compat.py
Improved progress reporting (See desc) (#1125)
[yt-dlp.git] / yt_dlp / compat.py
index 7b55b7d9d46183e593bd88a4a989e5f93db4890e..b107b211421c5113cfb255803876ca13ce03a9d2 100644 (file)
@@ -33,6 +33,8 @@ class compat_HTMLParseError(Exception):
     pass
 
 
+# compat_ctypes_WINFUNCTYPE = ctypes.WINFUNCTYPE
+# will not work since ctypes.WINFUNCTYPE does not exist in UNIX machines
 def compat_ctypes_WINFUNCTYPE(*args, **kwargs):
     return ctypes.WINFUNCTYPE(*args, **kwargs)
 
@@ -157,6 +159,12 @@ def compat_expanduser(path):
         compat_pycrypto_AES = None
 
 
+def windows_enable_vt_mode():  # TODO: Do this the proper way https://bugs.python.org/issue30075
+    if compat_os_name != 'nt':
+        return
+    os.system('')
+
+
 #  Deprecated
 
 compat_basestring = str
@@ -279,5 +287,6 @@ def compat_expanduser(path):
     'compat_xml_parse_error',
     'compat_xpath',
     'compat_zip',
+    'windows_enable_vt_mode',
     'workaround_optparse_bug9161',
 ]