Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f77161a

Browse filesBrowse files
committed
Update examples - print Chromium and CEF version numbers
1 parent 17caa51 commit f77161a
Copy full SHA for f77161a

File tree

Expand file treeCollapse file tree

3 files changed

+22
-10
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+22
-10
lines changed
Open diff view settings
Collapse file

‎examples/hello_world.py‎

Copy file name to clipboardExpand all lines: examples/hello_world.py
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Hello world example. Doesn't depend on any third party GUI framework.
2-
# Tested with CEF Python v55.3+.
2+
# Tested with CEF Python v57.0+.
33

44
from cefpython3 import cefpython as cef
55
import platform
@@ -17,10 +17,14 @@ def main():
1717

1818

1919
def check_versions():
20-
print("[hello_world.py] CEF Python {ver}".format(ver=cef.__version__))
20+
ver = cef.GetVersion()
21+
print("[hello_world.py] CEF Python {ver}".format(ver=ver["version"]))
22+
print("[hello_world.py] Chromium {ver}".format(ver=ver["chrome_version"]))
23+
print("[hello_world.py] CEF {ver}".format(ver=ver["cef_version"]))
2124
print("[hello_world.py] Python {ver} {arch}".format(
22-
ver=platform.python_version(), arch=platform.architecture()[0]))
23-
assert cef.__version__ >= "55.3", "CEF Python v55.3+ required to run this"
25+
ver=platform.python_version(),
26+
arch=platform.architecture()[0]))
27+
assert cef.__version__ >= "57.0", "CEF Python v57.0+ required to run this"
2428

2529

2630
if __name__ == '__main__':
Collapse file

‎examples/screenshot.py‎

Copy file name to clipboardExpand all lines: examples/screenshot.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,13 @@ def main():
6565

6666

6767
def check_versions():
68-
print("[screenshot.py] CEF Python {ver}".format(ver=cef.__version__))
68+
ver = cef.GetVersion()
69+
print("[screenshot.py] CEF Python {ver}".format(ver=ver["version"]))
70+
print("[screenshot.py] Chromium {ver}".format(ver=ver["chrome_version"]))
71+
print("[screenshot.py] CEF {ver}".format(ver=ver["cef_version"]))
6972
print("[screenshot.py] Python {ver} {arch}".format(
70-
ver=platform.python_version(), arch=platform.architecture()[0]))
73+
ver=platform.python_version(),
74+
arch=platform.architecture()[0]))
7175
print("[screenshot.py] Pillow {ver}".format(ver=PILLOW_VERSION))
7276
assert cef.__version__ >= "57.0", "CEF Python v57.0+ required to run this"
7377

Collapse file

‎examples/tutorial.py‎

Copy file name to clipboardExpand all lines: examples/tutorial.py
+8-4Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Tutorial example. Doesn't depend on any third party GUI framework.
2-
# Tested with CEF Python v56.2+
2+
# Tested with CEF Python v57.0+
33

44
from cefpython3 import cefpython as cef
55
import base64
@@ -78,10 +78,14 @@ def main():
7878

7979

8080
def check_versions():
81-
print("[tutorial.py] CEF Python {ver}".format(ver=cef.__version__))
81+
ver = cef.GetVersion()
82+
print("[tutorial.py] CEF Python {ver}".format(ver=ver["version"]))
83+
print("[tutorial.py] Chromium {ver}".format(ver=ver["chrome_version"]))
84+
print("[tutorial.py] CEF {ver}".format(ver=ver["cef_version"]))
8285
print("[tutorial.py] Python {ver} {arch}".format(
83-
ver=platform.python_version(), arch=platform.architecture()[0]))
84-
assert cef.__version__ >= "56.2", "CEF Python v56.2+ required to run this"
86+
ver=platform.python_version(),
87+
arch=platform.architecture()[0]))
88+
assert cef.__version__ >= "57.0", "CEF Python v57.0+ required to run this"
8589

8690

8791
def html_to_data_uri(html, js_callback=None):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.