Mageia Bugzilla – Attachment 11954 Details for
Bug 27457
No wx module in python2-wxpython4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
test fie
wxpythontest.py (text/plain), 751 bytes, created by
Herman Viaene
on 2020-10-23 11:02:41 CEST
(
hide
)
Description:
test fie
Filename:
MIME Type:
Creator:
Herman Viaene
Created:
2020-10-23 11:02:41 CEST
Size:
751 bytes
patch
obsolete
>import wx > >class MainWindow(wx.Frame): > def __init__(self, parent, title): > > super(MainWindow, self).__init__(parent, title = title, size = (600,500)) > self.Centre() > self.CreateStatusBar() > self.createMenu() > > def createMenu(self): > > menu= wx.Menu() > menuExit = menu.Append(wx.ID_EXIT, "E&xit", "Quit application") > > menuBar = wx.MenuBar() > menuBar.Append(menu,"&File") > self.SetMenuBar(menuBar) > > self.Bind(wx.EVT_MENU, self.OnExit, menuExit) > > def OnExit(self, event): > self.Close(True) #Close the frame > >if __name__ == '__main__': > app = wx.App() > window= MainWindow(None, "Newsy - read worldwide news!") > window.Show() > app.MainLoop() >
import wx class MainWindow(wx.Frame): def __init__(self, parent, title): super(MainWindow, self).__init__(parent, title = title, size = (600,500)) self.Centre() self.CreateStatusBar() self.createMenu() def createMenu(self): menu= wx.Menu() menuExit = menu.Append(wx.ID_EXIT, "E&xit", "Quit application") menuBar = wx.MenuBar() menuBar.Append(menu,"&File") self.SetMenuBar(menuBar) self.Bind(wx.EVT_MENU, self.OnExit, menuExit) def OnExit(self, event): self.Close(True) #Close the frame if __name__ == '__main__': app = wx.App() window= MainWindow(None, "Newsy - read worldwide news!") window.Show() app.MainLoop()
View Attachment As Raw
Actions:
View
Attachments on
bug 27457
: 11954