def is_win32_crypto_supported(): try: __import__('keyring.backends._win_crypto') except ImportError: return False return sys.platform in ['win32'] and sys.getwindowsversion()[-2] == 2