wx.grid question (trying to use code from Grid_Example.py)

paul paul at subsignal.org
Mon Oct 16 09:41:12 EDT 2006


Eric_Dexter at msn.com schrieb:
> To extend and revise my remarks my error is
> 
>  File "C:\Python24\Lib\site-packages\boa-constructor\test of
> snake\csoundgrid.py", line 8, in create_grid
> win = Grid_MegaExample.MegaTable(self, data, colnames, pugins)
> NameError: global name 'self' is not defined
> Script terminated.
This has nothing to do with wx, you just don't use "self" if you're
_calling_ a method. So:

def create_grid():
    win = Grid_MegaExample.MegaTable(data, colnames, pugins)
    win.Show(True)

should get you to the next error ;)

cheers
 paul




More information about the Python-list mailing list