13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>wxPython</strong> griptshttp://www.zetcode.com/wxpython/gripts/Python IDEHome ContentsFaster, Easier Python Development Editor, Debugger, Browser, and morewww.wingware.com<strong>wxPython</strong> GriptsIn this section we will show some small, complete scripts. <strong>The</strong>se graphicalscripts or "gripts" will demonstrate various areas in programming.Programming in Python, <strong>wxPython</strong> is easier than in most other toolkits. Butit is still a laborious task. <strong>The</strong>re is a long, long way from easy scripts toprofessional applications.TomEach application should have a good name. Short and easily remembered.So, we have Tom. A simple gript that sends an email.Figure: Tom#!/usr/bin/python# Tomimport wximport smtplibclass Tom(wx.Dialog):def __init__(self, parent, id, title):wx.Dialog.__init__(self, parent, id, title, size=(400, 420))panel = wx.Panel(self, -1)1 de 12 27/04/2008 1:09

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!