Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 54bd6f1

Browse files
authored
Merge pull request #17400 from anntzer/wxex
Cleanup wx examples.
2 parents cc10355 + 7a8be18 commit 54bd6f1

6 files changed

+20
-12
lines changed

examples/user_interfaces/embedding_in_wx2_sgskip.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,7 @@ def OnInit(self):
5959

6060
return True
6161

62-
app = App(0)
63-
app.MainLoop()
62+
63+
if __name__ == "__main__":
64+
app = App()
65+
app.MainLoop()

examples/user_interfaces/embedding_in_wx3_sgskip.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def OnInit(self):
127127
bang_button.Bind(wx.EVT_BUTTON, self.OnBang)
128128

129129
# final setup ------------------
130-
self.frame.Show(1)
130+
self.frame.Show()
131131

132132
self.SetTopWindow(self.frame)
133133

@@ -139,6 +139,7 @@ def OnBang(self, event):
139139
bangs = int(bangs) + 1
140140
bang_count.SetValue(str(bangs))
141141

142+
142143
if __name__ == '__main__':
143-
app = MyApp(0)
144+
app = MyApp()
144145
app.MainLoop()

examples/user_interfaces/embedding_in_wx4_sgskip.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ def OnInit(self):
7373
"""Create the main window and insert the custom frame."""
7474
frame = CanvasFrame()
7575
frame.Show(True)
76-
7776
return True
7877

79-
app = App(0)
80-
app.MainLoop()
78+
79+
if __name__ == "__main__":
80+
app = App()
81+
app.MainLoop()

examples/user_interfaces/fourier_demo_wx_sgskip.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,5 +231,7 @@ def OnInit(self):
231231
self.frame1.Show()
232232
return True
233233

234-
app = App()
235-
app.MainLoop()
234+
235+
if __name__ == "__main__":
236+
app = App()
237+
app.MainLoop()

examples/user_interfaces/mathtext_wx_sgskip.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,7 @@ def OnInit(self):
123123
frame.Show(True)
124124
return True
125125

126-
app = MyApp()
127-
app.MainLoop()
126+
127+
if __name__ == "__main__":
128+
app = MyApp()
129+
app.MainLoop()

examples/user_interfaces/wxcursor_demo_sgskip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ def OnInit(self):
6464

6565

6666
if __name__ == '__main__':
67-
app = App(0)
67+
app = App()
6868
app.MainLoop()

0 commit comments

Comments
 (0)