Menubar in frame for OSX

I have an application that contains a wxMenuBar in a wxFrame. When I run the code under OSX, the menubar appears at the top of the screen, rather than the top of the wxFrame. I realize this is the way it’s supposed to be, but in my situation I’d rather have the menubar display at the top of the frame.

I tried adding…

import os

to no avail.
How do I go about getting the menubar into the frame?

As far as I know it isn’t possible with the native menubar and menu classes. You can use a generic (non-native) set of menubar and menu classes instead, such as wx.lib.agw.flatmenu, but it has some glitches on OSX that would need to be addressed first.