The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

idl2pycli - IDL compiler to Python RPC-GIOP stub client

SYNOPSIS

idl2pycli [options] spec.idl

OPTIONS

All options are forwarded to C preprocessor, except -h -i -J -v -x.

With the GNU C Compatible Compiler Processor, useful options are :

-D name
-D name=definition
-I directory
-I-
-nostdinc

Specific options :

-h

Display help.

-i directory

Specify a path for import (only for version IDL 3.0).

-J directory

Specify a path for Python package.

-v

Display version.

-x

Enable export (only for version IDL 3.0).

DESCRIPTION

idl2pycli parses the given input file (IDL) and generates :

  • a set of Python sources : an optional _spec.py and pkg/__init__.py for each package

  • setup.py

idl2pycli is a Perl OO application what uses the visitor design pattern. The parser is generated by Parse::Yapp.

idl2pycli needs a cpp executable.

CORBA Specifications, including IDL (Interface Language Definition) and Python Language Mapping are available on <http://www.omg.org/>.

INSTALLATION

After standard Perl installation, you must install the Python package PyIDL :

    setup.py install

TUTORIAL

RPC-GIOP

RPC-GIOP is an another RPC (Remote Procedure Call) mecanism.

RPC-GIOP reuses a subset of CORBA GIOP messages, but don't deal with any CORBA ORB (Object Request Broker). RPC-GIOP reuses the CORBA CDR (Common Data Representation) transfer syntax.

An interface (a set of operations) is defined with CORBA IDL (Interface Definition Language). And this package supplies an client stub generator idl2pycli and an server skeleton generator idl2pysrv.

RPC-GIOP has a lot of common properties with CORBA GIOP :

  • needs a reliable transport layer (typically TCP/IP)

  • uses a binary format (CDR)

  • is interoperable (byte-order)

EXAMPLE 1

Use rpc1 as current directory.

The file Calc.idl describes the interface of a simple calculator.

Nota : the IDL interface Calc is in the global scope.

First, run :

    idl2pycli Calc.idl

Second, install :

    python setup.py install

Third, create your client client.py (Tkinter based)

Fourth, run the server (see idl2pysrv) and the client.

SEE ALSO

cpp, idl2html, idl2pysrv, idl2py

COPYRIGHT

(c) 2005-2007 Francois PERRAD, France. All rights reserved.

This program and all CORBA::Python modules are distributed under the terms of the Artistic Licence.

AUTHOR

Francois PERRAD, francois.perrad@gadz.org