mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-21 19:27:10 +01:00
* Changed imports to use either absolute or explicit relative imports. Implicit relative imports are no longer allowed. * Changes to accomodate standard library classes or modues moving to other locations, or being removed entirely. * Changes related to print becoming a function, execfile being removed, u'' no longer allowed, and other syntax related issues. * Working around C APIs that have changed or simply vanished. (PyInt, PyString, PyBytes, etc.) * Dealing with text file objects using strings vs binary file objects using bytes, auto-encoding, and etc. * Replacing the use of PyCObject with PyCapsule and dealing with an apparent bug where PyCapsule objects can't be imported from submodules within a package. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
24 lines
690 B
Python
24 lines
690 B
Python
import sys, os, wx
|
|
print(wx.version()); print(sys.version)
|
|
|
|
app = wx.App()
|
|
frm = wx.Frame(None, title="Hello World!")
|
|
pnl = wx.Panel(frm)
|
|
pnl.BackgroundColour = 'sky blue'
|
|
|
|
st = wx.StaticText(pnl, -1, 'Hello World!', (15,10))
|
|
st.SetFont(wx.Font(14, wx.FONTFAMILY_SWISS, wx.FONTFLAG_BOLD))
|
|
|
|
st = wx.StaticText(pnl, pos=(15,40), label=
|
|
'This is wxPython %s\nrunning on Python %s' %
|
|
(wx.version(), sys.version.split(' ')[0]))
|
|
st.SetFont(wx.Font(10, wx.FONTFAMILY_SWISS, wx.FONTFLAG_BOLD))
|
|
|
|
bmp = wx.Bitmap(os.path.join(os.path.dirname(__file__), 'phoenix_main.png'))
|
|
sb = wx.StaticBitmap(pnl, label=bmp, pos=(15,85))
|
|
|
|
frm.Show()
|
|
app.MainLoop()
|
|
|
|
|