home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / doc / python-pyorbit / README < prev    next >
Encoding:
Text File  |  2003-09-01  |  2.4 KB  |  78 lines

  1. PyORBit
  2. =======
  3.  
  4. This is a Python language binding for the ORBit2 CORBA implementation.
  5. It aims to take advantage of new features found in ORBit2 to make
  6. language bindings more efficient.  This includes:
  7.   - Use of ORBit2 type libraries to generate stubs
  8.   - use of the ORBit_small_invoke_stub() call for operation
  9.     invocation, which allows for short circuited invocation on local
  10.     objects.
  11.  
  12. Where it makes sense, this binding tries to stay compatible with the
  13. Python language mapping, which can be found on the OMG web site:
  14.     http://www.omg.org/cgi-bin/doc?formal/02-09-07
  15.  
  16. Currently only the client side of the binding has been done.
  17.  
  18.  
  19. Required ORBit2 Version
  20. -----------------------
  21.  
  22. Due to a number of bugs in ORBit2 2.4.3, PyORBit requires version
  23. 2.4.4 or later.  Versions of ORBit2 taken from the HEAD branch can
  24. also be used.
  25.  
  26. As some of the bugs were in the IDL compiler, you may need to
  27. recompile code generated by the IDL compiler.  This includes the
  28. "Bonobo" typelib (distributed with libbonobo), and probably other
  29. libraries.
  30.  
  31.  
  32. Typelibs
  33. --------
  34.  
  35. Before using an interface, you should build a typelib for it.  The
  36. basic steps are:
  37.  
  38.  $ orbit-idl-2 --imodule filename.idl
  39.  $ gcc -fPIC -c filename-imodule.c `pkg-config --cflags ORBit-2.0`
  40.  $ gcc -shared -o filename_module.so filename-imodule.o \
  41.         `pkg-config --libs ORBit-2.0`
  42.  
  43. You can then install the imodule in $(prefix)/lib/orbit-2.0.
  44.  
  45. Alternatively, you can install it somewhere else and set the
  46. ORBIT_TYPELIB_PATH environment variable to point at it.
  47.  
  48. You can then load the typelib with the following python statement:
  49.  
  50.  >>> ORBit.load_typelib('filename')
  51.  
  52. This will generate stubs and skeletons for all the types in the IDL
  53. file.
  54.  
  55.  
  56. Loading IDL Files
  57. -----------------
  58.  
  59. Since version 2.6, ORBit2 has had support for generating typelib
  60. information from IDL files at runtime.  PyORBit can make use of this
  61. functionality:
  62.  
  63.  >>> ORBit.load_file('filename.idl' [, 'cpp arguments'])
  64.  
  65. As with load_typelib(), this will generate stubs and skeletons.
  66.  
  67.  
  68. Automatic Type Discovery
  69. ------------------------
  70.  
  71. If you are only interested in acting as a client (ie. calling
  72. operations on objects), then it may not be necessary to build a
  73. typelib.  ORBit2 includes introspection support that allows PyORBit to
  74. snarf typelib information from an object reference, provided that the
  75. server is implemented with ORBit2.
  76.  
  77. This makes client side operation almost painless.
  78.