I tried the first post on wxpython by fuse. The code is as follows
#
import wx
#
# always add this line, or your code won't compile - the wx module contains the GUI code you'll use
#
"""The start of our wxPython GUI tutorial"""
#
#
app = wx.App(redirect=False) # create a wx application
#
#
window = wx.Frame(None, title = 'Sample GUI App') # create a window
#
btn = wx.Button(window)
#
# create a button 'widget' on the window - note how the button receives the window. This creates a tree-like structure where the window is the parent node and anything else like buttons are child nodes.
#
#
window.Show() # make the frame (and hence button) visible
#
app.MainLoop() # keep things going]
But when i tried to execute it i am getting the following error
surai@napster:~$ python first.py
Traceback (most recent call last):
File "first.py", line 2, in <module>
import wx
File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/__init__.py", line 45, in <module>
from wx._core import *
File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 6, in <module>
new_instancemethod = new.instancemethod
AttributeError: 'module' object has no attribute 'instancemethod'
surai@napster:~$
No matter what ever code i type i am getting the same error. Please provide me some suitable to suggestion to overcome them.