next up previous contents index
Next: Using FFTW Up: Miscellaneous Previous: Using Aligner, Comparators, and   Contents   Index


Using Pyste

EMAN2 uses Pyste to automatically parse C++ code to generate boost python wrappers. To use Pyste:

  1. Install Pyste libraries/tools:
    1. Pyste in boost library
    2. elementtree
    3. gccxml
  2. Create or modify the pyste file (e.g., eman2/libpyEM/processor.pyste). For a function that return a pointer, a return-policy must be defined in the pyste file. The typical cases are:
    1. If the function returns a pointer allocated in this function, do:
      set_policy(YOUR_FUNCTION, return_value_policy(manage_new_object))
    2. If the function returns a static pointer , do:
      set_policy(YOUR_FUNCTION, return_value_policy(reference_existing_object))
    3. For other cases, do:
      set_policy(YOUR_FUNCTION, return_internal_reference())
  3. Run script: eman2/libpyEM/create_boost_python



2013-06-11