| 94 | |
| 95 | |
| 96 | def check_versions(): |
| 97 | if platform.system() != "Windows": |
| 98 | print("ERROR: This example is for Windows platform only") |
| 99 | sys.exit(1) |
| 100 | |
| 101 | print("[pywin32.py] CEF Python {ver}".format(ver=cef.__version__)) |
| 102 | print("[pywin32.py] Python {ver} {arch}".format( |
| 103 | ver=platform.python_version(), arch=platform.architecture()[0])) |
| 104 | |
| 105 | # PyWin32 version |
| 106 | python_lib = distutils.sysconfig.get_python_lib(plat_specific=1) |
| 107 | with open(os.path.join(python_lib, "pywin32.version.txt")) as fp: |
| 108 | pywin32_version = fp.read().strip() |
| 109 | print("[pywin32.py] pywin32 {ver}".format(ver=pywin32_version)) |
| 110 | |
| 111 | assert cef.__version__ >= "57.0", "CEF Python v57.0+ required to run this" |
| 112 | |
| 113 | |
| 114 | def create_browser(window_info, settings, url): |