Is there a way to get a PyObjC proxy object for an Objective-C object, given only its id as an integer? Can it be done without an extension module?
In my case, I’m trying to get a Cocoa proxy object from the return value of wx.Frame.GetHandle (using wxMac with Cocoa).
The one solution I did find relies on
ctypesto create anobjc_objectobject from theid:An example of its use to print a
wx.Frame:It’s a little nasty since it uses
ctypes. If there’s apyobjcAPI function I overlooked or some other neater way to do it, I’d surely be interested.