variant Module

Utility functions to mimic the template support functions for vtkVariant

paraview.variant.vtkVariantCast(v, t)[source]

Cast the vtkVariant to the specified value type, where the type is in the following format: ‘int’, ‘unsigned int’, etc. for numeric types, and ‘string’ or ‘unicode string’ for strings. You can also use an integer VTK type constant for the type.

paraview.variant.vtkVariantCreate(v, t)[source]

Create a vtkVariant of the specified type, where the type is in the following format: ‘int’, ‘unsigned int’, etc. for numeric types, and ‘string’ or ‘unicode string’ for strings. You can also use an integer VTK type constant for the type.

paraview.variant.vtkVariantEqual(s1, s2)[source]

Return true if s1 == s2. This isn’t very useful in Python.

paraview.variant.vtkVariantExtract(v, t=None)[source]

Extract the specified value type from the vtkVariant, where the type is in the following format: ‘int’, ‘unsigned int’, etc. for numeric types, and ‘string’ or ‘unicode string’ for strings. You can also use an integer VTK type constant for the type. Set the type to ‘None” to extract the value in its native type.

paraview.variant.vtkVariantLessThan(s1, s2)[source]

Return true if s1 < s2. This isn’t very useful in Python.

paraview.variant.vtkVariantStrictEquality(s1, s2)[source]

Check two variants for strict equality of type and value.

paraview.variant.vtkVariantStrictWeakOrder(s1, s2)[source]

Compare variants by type first, and then by value. The return values are -1, 0, 1 like the python cmp() method, for compatibility with the python list sort() method. This is in contrast with the C++ version, which returns true or false.