How to write an API for a Python application?

Mike Meyer mwm at mired.org
Wed Nov 16 15:43:33 EST 2005


"Eric Brunel" <eric_brunel at despammed.com> writes:
> On 16 Nov 2005 06:18:05 -0800, Paul Boddie <paul at boddie.org.uk> wrote:
>> One technology that I used many years ago with Python, and which should
>> still do the job is CORBA - at that time ILU, but I suppose the various
>> other ORBs should also be as capable; certainly, ILU permitted
>> callbacks from the server into the client. These days, you might want
>> to look at omniORB, Fnorb and ORBit.
> I never saw any way to create callbacks from server to client with CORBA. How would you describe such a callback in the IDL file?

It's OO, not functional. You pass an object to the server, and the
server invokes methods on that object. In the IDL, you use the
interface name as a type. I.e.:

  interface Window {
  ...
  }
  
  and in another interface:
  WindowList	FindWindows(in Window name) ;

And, FWIW, Fnorb hasn't been maintained for a while. It requires
patching to run on recent versions of Python.

         <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more
information. 



More information about the Python-list mailing list