How to invoke parent's method?
rweth at cisco.com
Sun Jan 7 09:51:15 CET 2007
> Hi, pythoners:
> My wxPython program includes a panel whose parent is a frame. The
> panel has a button. When I click the button , I want to let the frame
> destroy. How to implement it? Could the panel invoke the frame's
I think it "could" if what I read recently in:
Look at the link "Cooperative methods and super"
Write a subclass of panel where the target method of it's parent
is targX (that parent method of Frame that you want to call)
class myPanel (Panel):
def dadsX (self):
I think you are forced to invoke this within a method of the Class
itself, as opposed to doing so with an instance.
More information about the Python-list