File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ a replacement for standard GUI toolkits such as wxWidgets,
77Qt or GTK. With this tutorial you will learn CEF Python
88basics. This tutorial will discuss the two basic examples:
99[ hello_world.py] ( ../examples/hello_world.py )
10- and [ tutorial.py] ( ../examples/tutorial.py ) . There are more
11- many more examples that you can find in the [ Examples-README.md] ( ../examples/Examples-README.md )
10+ and [ tutorial.py] ( ../examples/tutorial.py ) . There are many
11+ more examples that you can find in the [ Examples-README.md] ( ../examples/Examples-README.md )
1212file, but these examples are out of scope for this tutorial.
1313
1414
@@ -33,8 +33,7 @@ You can install with pip. On Linux pip 8.1+ is required. Alternatively
3333you can download packages for offline installation from [ GitHub Releases] ( ../../../releases ) .
3434
3535Run the commands below to install the cefpython3 package, clone
36- the github repository, enter the examples/ directory and run the
37- Hello World example:
36+ the repository and run the Hello World example:
3837
3938``` commandline
4039pip install cefpython3==56.1
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ def create_menu(self):
109109
110110 def embed_browser (self ):
111111 window_info = cef .WindowInfo ()
112- (width , height ) = self .browser_panel .GetClientSizeTuple ()
112+ (width , height ) = self .browser_panel .GetClientSize (). Get ()
113113 window_info .SetAsChild (self .browser_panel .GetHandle (),
114114 [0 , 0 , width , height ])
115115 self .browser = cef .CreateBrowserSync (window_info ,
@@ -197,14 +197,15 @@ def create_timer(self):
197197 # http://wiki.wxwidgets.org/Making_a_render_loop
198198 # Another way would be to use EVT_IDLE in MainFrame.
199199 self .timer = wx .Timer (self , self .timer_id )
200+ self .Bind (wx .EVT_TIMER , self .on_timer , self .timer )
200201 self .timer .Start (10 ) # 10ms timer
201- wx .EVT_TIMER (self , self .timer_id , self .on_timer )
202202
203203 def on_timer (self , _ ):
204204 cef .MessageLoopWork ()
205205
206206 def OnExit (self ):
207207 self .timer .Stop ()
208+ return 0
208209
209210
210211if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments