MCPcopy Create free account
hub / github.com/cztomczak/cefpython / main

Function main

examples/tutorial.py:60–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58
59
60def main():
61 check_versions()
62 sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
63 # To change user agent use either "product_version"
64 # or "user_agent" options. Explained in Tutorial in
65 # "Change user agent string" section.
66 settings = {
67 # "product_version": "MyProduct/10.00",
68 # "user_agent": "MyAgent/20.00 MyProduct/10.00",
69 }
70 cef.Initialize(settings=settings)
71 set_global_handler()
72 browser = cef.CreateBrowserSync(url=html_to_data_uri(HTML_code),
73 window_title="Tutorial")
74 set_client_handlers(browser)
75 set_javascript_bindings(browser)
76 cef.MessageLoop()
77 cef.Shutdown()
78
79
80def check_versions():

Callers 1

tutorial.pyFile · 0.70

Calls 5

set_global_handlerFunction · 0.85
html_to_data_uriFunction · 0.85
set_client_handlersFunction · 0.85
set_javascript_bindingsFunction · 0.85
check_versionsFunction · 0.70

Tested by

no test coverage detected