Python Forum
[WxPython] Puzzled by classes
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[WxPython] Puzzled by classes
#1
I have been learning to create GUI's using tkinter for some time and have created around 12 which I am happy with.
I have not used classes but see more and more examples of code using them.
I had not seen anything to persuade me to use classes or to change from using tkinter to using wxPython.
I found wxPython to be difficult for me to work with initially which is why I chose tkinter.
Recently I saw that wxPython seems to me very versatile so started to look here
Quote:http://zetcode.com/wxpython/menustoolbars/
Looking at these examples I cannot figure out how anything is instantiated.
The class is defined but seems to be used directly but I don't understand this:
def main():
    
    ex = wx.App()
    Example(None)
    ex.MainLoop()    
Could someone explain this please?
Thanks
Reply


Messages In This Thread
Puzzled by classes - by Barrowman - Aug-14-2017, 12:58 PM
RE: Puzzled by classes - by nilamo - Aug-14-2017, 02:40 PM
RE: Puzzled by classes - by Larz60+ - Aug-14-2017, 05:21 PM
RE: Puzzled by classes - by nilamo - Aug-14-2017, 05:35 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020