Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #63912 > unrolled thread
| Started by | ngangsia akumbo <ngangsia@gmail.com> |
|---|---|
| First post | 2014-01-14 07:26 -0800 |
| Last post | 2014-01-14 09:33 -0800 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.python
wx (not responding) ngangsia akumbo <ngangsia@gmail.com> - 2014-01-14 07:26 -0800
Re: wx (not responding) Frank Miles <fpm@u.washington.edu> - 2014-01-14 15:56 +0000
Re: wx (not responding) ngangsia akumbo <ngangsia@gmail.com> - 2014-01-14 09:33 -0800
| From | ngangsia akumbo <ngangsia@gmail.com> |
|---|---|
| Date | 2014-01-14 07:26 -0800 |
| Subject | wx (not responding) |
| Message-ID | <c9f4a8ee-48d0-4846-8041-5161a39dd8a3@googlegroups.com> |
When i run this code on my pc it actually runs but signals that the app is not responding.
import wx
class Example(wx.Frame):
def __init__(self, *args, **kwargs):
super(Example, self).__init__(*args, **kwargs)
self.InitUI()
def InitUI(self):
menubar = wx.MenuBar()
fileMenu = wx.Menu()
fitem = fileMenu.Append(wx.ID_EXIT, 'QUIT', 'Quit application')
menubar.Append(fileMenu, '&File')
self.Bind(wx.EVT_MENU, self.OnQuit, fitem)
self.SetSize((300, 200))
self.SetTitle('Simple menu')
self.Center()
self.Show(True)
def OnQuit(self, e):
self.Close()
def main():
ex = wx.App()
Example(None)
ex.Mainloop()
if __name__ == "__main__":
main()
[toc] | [next] | [standalone]
| From | Frank Miles <fpm@u.washington.edu> |
|---|---|
| Date | 2014-01-14 15:56 +0000 |
| Message-ID | <lb3mnq$vop$1@dont-email.me> |
| In reply to | #63912 |
On Tue, 14 Jan 2014 07:26:10 -0800, ngangsia akumbo wrote: > When i run this code on my pc it actually runs but signals that the app is not responding. [snip most of the code]- > def main(): > ex = wx.App() > Example(None) > ex.Mainloop() > > > if __name__ == "__main__": > main() When I tried to run it I got a "AttributeError: 'App' object has no attribute 'Mainloop' Not sure whether your wx version might have a 'Mainloop'.
[toc] | [prev] | [next] | [standalone]
| From | ngangsia akumbo <ngangsia@gmail.com> |
|---|---|
| Date | 2014-01-14 09:33 -0800 |
| Message-ID | <bf57281c-bfda-41cc-a27f-bd76e8745bde@googlegroups.com> |
| In reply to | #63913 |
On Tuesday, January 14, 2014 4:56:42 PM UTC+1, cassiope wrote: > On Tue, 14 Jan 2014 07:26:10 -0800, ngangsia akumbo wrote: > Not sure whether your wx version might have a 'Mainloop'. I think is ok now thanks
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web