[omniORB] Python implementation skeleton generator available.

Richard Gruet rjgruet@yahoo.com
Sun, 23 Sep 2001 21:30:14 -0700


Hi OmniORBers and more specifically OmniORBPythoners,

I have written a Python utility named 'ipy' that generates Python
implementation skeletons from IDL interfaces. Here is an excerpt of the
manual:

WHAT IS IT ?

ipy (alias idl2pyImpl) is a Python/CORBA utility program that generates
Python implementation skeletons from IDL sources
(IDL files or Interface Repository). It allows to create very quickly a
basic but running Python prototype of a CORBA server, given
its IDL definition.

WHAT FOR ?

Did you ever notice that once you have written an IDL specification and
generated the stubs using omniidl, you still have a fair
amount of work to accomplish to get a working server and a test client
?  Create a Python module (with a header, etc..), an
implementation Python class for each IDL interface, with a method for
each IDL operation. Of course, you must respect the
original signatures while mapping IDL types to  Python ones. And what
about the original comments in the IDL ? Would'nt it be
nice to get them automatically instead of copy/pasting them (just in
case you put comments, I'm kidding) ? And a server
requires a main, taking care of all the activation stuff. Probably this
main will take some args... And some log capabilities, and
also a Name service, and why not - if you have several servers - some
administration capability (launch & stop the servers) ?
Sure, if your purpose is to write an Echo or a Hello Server, it looks a
bit overkill to have all these features, but you still need half
of them! But for a more realistic server... After that, you are ready to
start the REAL implementation, the one related to your
problem... if with all that overhead, you have not forgotten the
original purpose of your server !
Ever dreamed of a tool that would generate quickly a skeleton with all
these features built-in for you, so you can focus on the
implementation of the methods declared in the IDL interface ?

That's precisely where ipy may help :

     It is a generator: it will create  the Python implementation
skeletons from the IDL source, defining classes, methods
     (preserving comments), creating optionally a main and a test client
with invocation arguments, and even a help
     message!  It may also generate the OmniORB stubs on demand.
Generation uses a customizable set of templates defined
     in a Python module.
     it is a framework: the default templates used for generating the
implementation skeleton relies on a framework of
     Python classes called scf (Simple Corba Framework) that provides
simple implementations for basic functionnalities
     required by a typical Corba server (log, name service,
administration...), so you can dispose of a functional server in a
     minimum of time. However, you can if you prefer use a different set
of templates that don't rely on scf.

PROS AND CONS

ipy is great to get in a snap a working Python prototype of a CORBA
server, given an IDL specification. It may also be used
for an operational -non prototype- server,  but it is not obvious that
it will fit your existing context if any, or it
might require a significant amount of adaptation in that case. So its
primary usage is to get quickly a first
implementation to check the validity of IDL interfaces, prototype, or
serve as a basis for a more serious implementation.
However, I used it in real operational projects (but in that case, it
was by chance fitting my context, maybe this is because I am
the author ;-)

HOW TO GET IT

WINDOWS:
- Download  http://rgruet.free.fr/ipy12.zip and uncompress it
(preserving file structure) to the  place where you want the ipy
directory to be created (e.g. D:\). It will create a directory named
'ipy<version#>' (e.g:  D:\ipy12).
- Read the manual ipy-Manual.html or the READ.ME and follow the
instructions to complete the installation.

UNIX
- Download http://rgruet.free.fr/ipy12.tgz and uncompress it (preserving
file structure) to the place where you want the ipy directory to be
created (e.g. /usr/local). It will create a directory named
'ipy<version#>'  (e.g: /usr/local/ipy12).
- Read the manual ipy-Manual.html or the READ.ME and follow the
instructions to complete the installation.

I would be happy if this program happens to be useful to someone. I have
used it myself in several occasions.
Any comment will be welcome,

Cheers

Richard Gruet


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com