<%
# Takes the input SPL tuple and converts it to
# as a dict to be passed to a Python functional operator
#
# Leaves the C++ variable value set to a PyObject * dict.

# Variables that need to be set:
# $iport - input port 
%>

  PyObject *value = 0;
  {
  SplpyGIL lockdict;
  PyObject * pyDict = PyDict_New();
<%
     for (my $i = 0; $i < $inputAttrs2Py; ++$i) {
         my $la = $iport->getAttributeAt($i);
         print convertAndAddToPythonDictionaryObject($iport->getCppTupleName(), $i, $la->getSPLType(), $la->getName(), 'pyInNames_');
     }
%>
  value = pyDict;
  }
