13.07.2015 Views

The wxPython tutorial

The wxPython tutorial

The wxPython tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Internationalizationhttp://www.zetcode.com/wxpython/in18/Figure: LocaleWorld TimeAt a specific moment, we have different time in countries acrossthe world. Our globe is divided into time zones. It is notuncommon for programmers to deal with such tasks. <strong>wxPython</strong>comes with a wx.DateTime object. According to thedocumentation, wxDateTime class represents an absolutemoment in the time.#!/usr/bin/pythonimport wximport timeclass WorldTime(wx.Frame):def __init__(self, parent, id, title):wx.Frame.__init__(self, parent, id, title, size=(270, 280))self.panel = wx.Panel(self, -1)self.panel.SetBackgroundColour('#000000')font = wx.Font(12, wx.FONTFAMILY_DEFAULT,wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_BOLD, False, 'Georgia')5 de 12 27/04/2008 1:06

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

Saved successfully!

Ooh no, something went wrong!