Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias TryExcept body ImportFrom alias alias ImportFrom alias ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias alias ImportFrom alias ImportFrom alias ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults Str body Expr Str If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Slice Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str NameLoad AugAssignAdd NameStore BinOpMod Str NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Continue If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad UnaryOpNot Call NameLoad Call NameLoad NameLoad NameLoad Str body Continue Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body For NameStore NameLoad body If CompareIn AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad If CompareIs NameLoad NameLoad body Expr Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore SubscriptLoad NameLoad Slice body Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Num NameLoad Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam NameParam defaults Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr If Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd NameLoad Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num If BoolOpAnd CompareEq Call NameLoad NameLoad Num CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Num If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call NameLoad Str NameLoad Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpAdd Call NameLoad NameLoad Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args defaults body Assign NameStore Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword NameLoad keyword Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareEq Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A This module generates tvtk (Traited VTK) classes from the
VTK-Python API.

 __future__ print_function N/A vtk N/A os N/A os.path N/A zipfile N/A tempfile N/A shutil N/A glob optparse OptionParser N/A N/A common get_tvtk_name camel2enthought wrapper_gen WrapperGenerator special_gen HelperGenerator N/A N/A N/A SystemError N/A common get_tvtk_name camel2enthought wrapper_gen WrapperGenerator special_gen HelperGenerator TVTKGenerator N/A N/A N/A Generates all the TVTK code. __init__ N/A N/A self out_dir N/A N/A N/A Initializes the instance.

        Parameters
        ----------

        - out_dir -  `string`

          The output directory to generate code in.  The directory is
          created if it does not exist.  A directory called
          `tvtk_classes` is created inside this directory and all the
          code is written here.  Any existing code there is blindly
          overwritten.  If no out_dir is specified, a temporary one is
          created using `tempfile.mkdtemp`.

         N/A N/A out_dir N/A N/A out_dir N/A N/A tempfile mkdtemp N/A N/A self out_dir N/A N/A N/A os path join out_dir tvtk_classes N/A N/A N/A N/A N/A os path exists N/A self out_dir N/A N/A N/A N/A os makedirs N/A self out_dir N/A N/A self zip_name tvtk_classes.zip N/A N/A self wrap_gen N/A WrapperGenerator N/A N/A self helper_gen N/A HelperGenerator N/A generate_code N/A N/A self N/A N/A N/A Generate all the wrapper code in `self.out_dir`.
         N/A out_dir N/A self out_dir N/A helper_gen N/A self helper_gen N/A wrap_gen N/A self wrap_gen N/A f N/A open N/A N/A N/A os path join out_dir __init__.py w N/A N/A N/A f close N/A v N/A N/A vtk vtkVersion N/A vtk_version N/A N/A N/A v GetVTKVersion N/A 3 N/A vtk_src_version N/A N/A v GetVTKSourceVersion N/A code N/A vtk_build_version = '%s'
 vtk_version N/A code N/A vtk_build_src_version = '%s'
 vtk_src_version N/A f N/A open N/A N/A N/A os path join out_dir vtk_version.py w N/A N/A N/A f write code N/A N/A N/A f close N/A helper_file N/A open N/A N/A N/A os path join out_dir tvtk_helper.py w N/A N/A N/A helper_gen write_prelims helper_file N/A tree N/A N/A N/A wrap_gen get_tree tree N/A classes N/A N/A node N/A N/A wrap_gen get_tree N/A N/A name N/A node name N/A N/A N/A N/A N/A name startswith vtk N/A N/A name startswith vtkQt N/A N/A N/A N/A N/A N/A hasattr vtk name N/A N/A hasattr N/A getattr vtk name IsA N/A N/A N/A N/A N/A classes append name N/A nodes tree N/A N/A node nodes N/A N/A N/A N/A node name classes N/A N/A tvtk_name N/A get_tvtk_name N/A node name N/A N/A N/A self _write_wrapper_class node tvtk_name N/A N/A N/A helper_gen add_class tvtk_name helper_file N/A N/A N/A helper_file close N/A write_wrapper_classes N/A N/A self names N/A N/A N/A Given VTK class names in the list `names`, write out the
        wrapper classes to a suitable file.  This is a convenience
        method so one can generate a just a few of the wrapper classes
        if desired.  This is useful when debugging.  Please note that
        the method also generates code for all the ancestors of the
        specified classes.

         N/A nodes N/A N/A name names N/A N/A node N/A N/A N/A N/A N/A self wrap_gen get_tree get_node name N/A N/A node None N/A N/A N/A print N/A ERROR: Cannot find class: %s name N/A N/A N/A nodes append node N/A node N/A nodes N/A N/A N/A anc N/A N/A node get_ancestors N/A i anc N/A N/A N/A i nodes N/A N/A N/A N/A nodes insert 0 i N/A N/A N/A nodes sort N/A N/A N/A x y N/A N/A cmp N/A x level N/A y level N/A node nodes N/A N/A tvtk_name N/A get_tvtk_name N/A node name N/A N/A N/A self _write_wrapper_class node tvtk_name N/A build_zip N/A N/A self include_src N/A False N/A N/A Build the zip file (with name `self.zip_name`) in the
        current directory.

        Parameters
        ----------

        - include_src : `bool` (default: False)

          If True, also includes all the ``*.py`` files in the ZIP file.
          By default only the ``*.pyc`` files are included.

         N/A cwd N/A N/A os getcwd N/A d N/A N/A N/A os path dirname N/A self out_dir N/A N/A N/A os chdir d N/A z N/A N/A zipfile PyZipFile N/A self zip_name w N/A zipfile ZIP_DEFLATED N/A include_src N/A N/A l N/A N/A glob glob N/A N/A N/A os path join tvtk_classes *.py N/A x l N/A N/A fname N/A N/A N/A os path basename x N/A N/A N/A z write x N/A tvtk_classes/%s fname N/A N/A N/A z writepy tvtk_classes N/A N/A N/A z close N/A N/A N/A N/A os path exists N/A N/A cwd / N/A self zip_name N/A N/A N/A N/A os unlink N/A N/A cwd / N/A self zip_name N/A N/A N/A shutil move N/A self zip_name cwd N/A N/A N/A os chdir cwd N/A clean N/A N/A self N/A N/A N/A Delete the temporary directory where the code has been
        generated.
         N/A tmp_dir N/A N/A N/A os path dirname N/A self out_dir N/A d N/A N/A os listdir tmp_dir N/A ok 0 N/A N/A N/A N/A len d 1 N/A N/A d N/A 0 tvtk_classes N/A N/A ok 1 N/A ok N/A N/A N/A N/A shutil rmtree tmp_dir N/A N/A N/A print Not removing directory: tmp_dir N/A N/A print It does not contain a tvtk_classes directory! N/A _write_wrapper_class N/A N/A self node tvtk_name N/A N/A N/A Write the wrapper code to a file. N/A fname N/A N/A camel2enthought tvtk_name .py N/A out N/A open N/A N/A N/A os path join N/A self out_dir fname w N/A N/A N/A N/A self wrap_gen generate_code node out N/A N/A N/A out close N/A N/A main N/A N/A N/A N/A N/A usage usage: %prog [options] [vtk_classes]

The options are described below.  An optional list of VTK classes for
which code is to be generated may be specified.  If none are specified
code will be generated for all the VTK classes.
     N/A parser N/A OptionParser usage N/A N/A N/A parser add_option -o --output-dir action store type string dest out_dir default help Output directory in which to generate code. N/A N/A N/A parser add_option -n --no-clean action store_false dest clean default True help Do not clean the temporary directory. N/A N/A N/A parser add_option -z --no-zipfile action store_false dest zip default True help Do not create a ZIP file. N/A N/A N/A parser add_option -s --source action store_true dest src default False help Include source files (*.py) in addition to *.pyc files in the ZIP file. N/A N/A options args N/A N/A parser parse_args N/A gen N/A TVTKGenerator N/A options out_dir N/A N/A N/A len args 0 N/A N/A N/A N/A gen generate_code N/A N/A N/A N/A gen write_wrapper_classes args N/A N/A options zip N/A N/A N/A N/A gen build_zip N/A options src N/A N/A options clean N/A N/A N/A N/A gen clean N/A N/A N/A __name__ __main__ N/A N/A N/A main