FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/examples/hello_world.py at cefpython55 · pythonthings/cefpython · GitHub
pythonthings
cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
examples
/
hello_world.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (17 loc) · 678 Bytes
Breadcrumbs
cefpython
/
examples
/
hello_world.py
Copy path
File metadata and controls
24 lines (17 loc) · 678 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Hello world example. Doesn't depend on any third party GUI framework.
# Tested with CEF Python v55.3+.
from
cefpython3
import
cefpython
as
cef
import
sys
def
main
():
check_versions
()
sys
.
excepthook
=
cef
.
ExceptHook
# To shutdown all CEF processes on error
cef
.
Initialize
()
cef
.
CreateBrowserSync
(
url
=
"https://www.google.com/"
)
cef
.
MessageLoop
()
cef
.
Shutdown
()
def
check_versions
():
print
(
"[hello_world.py] CEF Python {ver}"
.
format
(
ver
=
cef
.
__version__
))
print
(
"[hello_world.py] Python {ver}"
.
format
(
ver
=
sys
.
version
[:
6
]))
assert
cef
.
__version__
>=
"55.3"
,
"CEF Python v55.3+ required to run this"
if
__name__
==
'__main__'
:
main
()
Back
|
FazBrowse Home
|
New Git URL