This quick tutorial will show you how to make a quick Hello World GUI Application in Python.
Open up IDLE or notepad, or another text editor of your choice. In this put the following:
That is the entire code, now we will break it down further.
This will import the wxPyhon library and allow you to create the GUI applications.
This will declare a class with the default __init__ function which will initialize the frame when it is called to be opened. Doing it this way will allow you to open more than just 1 window of the same things.
This code will create the main panel of the form so its not a nasty gray background. the helloWorld variable will create the static text, such as a label, on the application with the text Hello World, I am a GUI application in Python. the self.Centre, and self.Show() will center the form on your screen, then show it.
This piece of code will create the application, then show the application with the class call. Finally, it will run the application so it all comes together and you can see it.
Note: There must be a blank line at the end of the py file or you will get an error.
Hope you learned something. If you have any questions post a comment.