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.10.2
users_guide Last Modified 2005-03-23

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