How to Create a SIDL Object in Python

(once you've built the Python extension module)

You need to import the extension module and then calling a method to create an instance. If you have a class whose fully qualified name is x.y.z, you would say:

$>>>$ import x.y.z
$>>>$ obj = x.y.z.z()

The last part of the class name is repeated. You can also use from x.y.z import * if you prefer; although, you must guarantee that there are no namespace collisions.

In some cases, the Python extension module may be name zmodule.so instead of simply z.so. This might tempt you to say import x.y.zmodule instead of just import x.y.z; resist this temptation!





babel-0.10.2
users_guide Last Modified 2005-03-23

http://www.llnl.gov/CASC/components
components@llnl.gov