To add to @Mike Driscoll's answer,
topFrame = wx.GetTopLevelParent(window).
topFrame = wx.GetTopLevelParent(window)
The function takes an argument, window (the object we want its top level parent).
window