titus.producer.expression.pfa

titus.producer.expression.pfa(expr, subs=None, symbols=None, cells=None, pools=None, options=None, **kwds)[source]

Convert Python code into a PFA expression (not a whole PFA document).

Parameters:
  • expr (string) – Python code in a string
  • subs (dict from substitution strings to their values) – Python identifiers to expand to given PFA structures
  • symbols (list of strings) – Python identifiers to assume are PFA expressions in scope
  • cells (list of strings) – Python identifiers to assume are PFA cell names
  • pools (list of strings) – Python identifiers to assume are PFA pool names
  • options (dict from option names to their values) – options for interpreting the Python and producing PFA, such as lineNumbers and wantArray
  • kwds (dict from substitution strings to their values) – added to subs (a more convenient way to pass them)
Return type:

Pythonized JSON

Returns:

the resulting PFA expression