#!/usr/bin/env python import wx app=None class SimpleButton(wx.Frame): def __init__(self, parent, id, title): wx.Frame.__init__(self, parent, id, title) self.cnt = 1 pnl = wx.Panel(self, -1) wx.Button(pnl, 1, 'Send', (150, 130)) self.text = wx.TextCtrl(pnl, -1,'',(250, 130),size=(200, 130), style=wx.TE_MULTILINE) wx.EVT_BUTTON(self, 1, self.OnSend) self.Show(True) def OnSend(self, event): self.text.AppendText(str(self.cnt)+'\n') self.cnt+=1 app = wx.App() sb = SimpleButton(None, -1, 'simple button example') import sys from omniORB import CORBA, PortableServer # Import the stubs and skeletons for the Example module import Example, Example__POA # Define an implementation of the Echo interface class Echo_i (Example__POA.Echo): def echoString(self, mesg): #print "echoString() called with message:", mesg wx.CallAfter(sb.text.AppendText,mesg+'\n') return mesg # Initialize the ORB orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) # Find the root POA poa = orb.resolve_initial_references("RootPOA") # Create an instance of Echo_i ei = Echo_i() # Create an object reference, and implicitly activate the object eo = ei._this() # Print out the IOR print orb.object_to_string(eo) # Activate the POA poaManager = poa._get_the_POAManager() poaManager.activate() app.MainLoop()