next up previous contents
Next: How to Call Methods Up: Python Bindings Previous: How to Create a   Contents

How to Cast SIDL Objects in Python

Let's say you have an object obj, and you would like to see if it is an instance of a SIDL class or interface whose fully qualified name is x.y.z. Here is how you do it.

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

Of course, you don't need the import if you know that x.y.z has already been imported. If zobj is not equal to None, the cast was successful.





babel-0.8.0
users_guide Last Modified 2003-01-14

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