FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python-cefpython/examples/devtools.py at dev · caooliver/Python-cefpython · GitHub
caooliver
Python-cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Python-cefpython
/
examples
/
devtools.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (20 loc) · 747 Bytes
Breadcrumbs
Python-cefpython
/
examples
/
devtools.py
Copy path
File metadata and controls
26 lines (20 loc) · 747 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
25
26
"""
This script is a workaround for CEF Python Issue #381 which is causing
keyboard issues in DevTools window in the wxpython.py example.
A solution is to open devtools window in a seprate process by executing
this script. An example usage is in the wxpython.py example. See
also the "api/DevToolsHandler.md" document.
"""
from
cefpython3
import
cefpython
as
cef
import
sys
DEVTOOLS_URL
=
sys
.
argv
[
1
]
def
main
():
print
(
"[devtools.py] url={0}"
.
format
(
DEVTOOLS_URL
))
sys
.
excepthook
=
cef
.
ExceptHook
# To shutdown all CEF processes on error
cef
.
Initialize
()
cef
.
CreateBrowserSync
(
url
=
DEVTOOLS_URL
,
window_title
=
"DevTools"
)
cef
.
MessageLoop
()
cef
.
Shutdown
()
if
__name__
==
'__main__'
:
main
()
Back
|
FazBrowse Home
|
New Git URL