It is the current version of wxPython(2.6). But follow you instruction it still can't work... But if using the default "from wxPython.wx import *", it work, don't know what is the problem. May be this is an old example that cannot work with "import wx". Because I get another example and it is ok.
I suspect you are mixing program code for the namespace version (import wx) with the old method of importing (from wxPython.wx import *).
Here are two version of a very simple app... try both and see if you get any errors. And if so, _please_ post the exact error you get.
--- BEGIN The "new" namespace version ----
import wx
class MainFrame(wx.Frame):
def __init__(self, parent, id=-1, title="Test Wx", size=(-1, -1), pos=(-1,-1), style=wx.DEFAULT_FRAME_STYLE|wx.NO_FULL_REPAINT_ON_RESIZE):
wx.Frame.__init__(self, parent, id, title, size, pos, style)
self.Show(True)
app = wx.PySimpleApp() frame = MainFrame(None, -1, "Test Wx NameSpace Style") app.MainLoop()
--- END The "new" namespace version ----
--- BEGIN The old style import ----
from wxPython.wx import *
class MainFrame(wxFrame):
def __init__(self, parent, id=-1, title="Test Wx", size=(-1, -1), pos=(-1,-1), style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE):
wxFrame.__init__(self, parent, id, title, size, pos, style)
self.Show(True)
app = wxPySimpleApp() frame = MainFrame(None, -1, "Test Wx Old Style") app.MainLoop()
--- END The old style import ----
Hope that helped!
Thanks, -Kartic
-- http://mail.python.org/mailman/listinfo/python-list