text: user4894: How do I translate the body of a function definition in SBML into infix using python libsbml?
  For example after loading the model using:
  reader = libsbml.SBMLReader()
  doc = reader.readSBMLFromString (r.getSBML())
  model = doc.model
  
  
  user4894: To do the translation you need to access the function definition. First, make sure there are function definitions in your model by using:
  if model.getNumFunctionDefinitions() > 0:
     # continue
  
  To get the infix of the body for the ith function definition use the following code:
  f = model.getFunctionDeinfition(i)
  body = f.getBody()
  print (libsbml.formulaToL3String(body))
  
  As a side note you can also get the jth argument for the function definition using:
  f = model.getFunctionDeinfition(i)
  arg = f.getArgument(j)
  print (libsbml.formulaToL3String(arg))
  
  
original_text: 4894: <p>How do I translate the body of a function definition in SBML into infix using python libsbml?</p>
  
  <p>For example after loading the model using:</p>
  
  <pre><code>reader = libsbml.SBMLReader()
  doc = reader.readSBMLFromString (r.getSBML())
  model = doc.model
  </code></pre>
   4894: <p>To do the translation you need to access the function definition. First, make sure there are function definitions in your model by using:</p>
  
  <pre><code>if model.getNumFunctionDefinitions() &gt; 0:
     # continue
  </code></pre>
  
  <p>To get the infix of the body for the ith function definition use the following code:</p>
  
  <pre><code>f = model.getFunctionDeinfition(i)
  body = f.getBody()
  print (libsbml.formulaToL3String(body))
  </code></pre>
  
  <p>As a side note you can also get the jth argument for the function definition using:</p>
  
  <pre><code>f = model.getFunctionDeinfition(i)
  arg = f.getArgument(j)
  print (libsbml.formulaToL3String(arg))
  </code></pre>
  