Jump to content


Photo

wxpython

wxpython GUI python

  • Please log in to reply
No replies to this topic

#1 Neil

Neil

    Administrator

  • Administrators
  • 1,493 posts

Posted 27 January 2013 - 08:25 PM

Normally, GUI programming is very difficult and labor intensive, you need to write a lot of what programmers call boiler plate code. Well wxpython takes all the hasel away from GUI programming. Once you have the library install try the following program.

#!/usr/bin/env python

import wx

app = wx.App(False) # Create a new app, don't redirect stdout/stderr to a window.
frame = wx.Frame(None, wx.ID_ANY, "Hello World") # A Frame is a top-level window.
frame.Show(True) # Show the frame.
app.MainLoop()


You should find that it will display the following application window.

Attached File  Screen Shot 2013-01-27 at 20.51.47.png   14.93KB   0 downloads

This is a genuine miracle, if you have very done or seen any GUI programming you will know that you need at a mininum 10x the amount of code here!

http://wiki.wxpython...llo.2C_World.22

The wxpython wiki is a great source of information.

Clear Skies,

Neil.







Also tagged with one or more of these keywords: wxpython, GUI, python