Using the Python opcode family, you can interact with a Python interpreter embedded in Csound in five ways:
- Initialize the Python interpreter (the pyinit opcodes),
- Run a statement (the pyrun opcodes),
- Execute a script (the pyexec opcodes),
- Invoke a callable and pass arguments (the pycall opcodes),
- Evaluate an expression (the pyeval opcodes), or
- Change the value of a Python object, possibly creating a new
Python object (the pyassign opcodes);
and you can do any of these things:
- At i-time or at k-time,
- In the global Python namespace, or in a namespace specific
to an individual instance of a Csound instrument (local or "l" context),
- And can you can retrieve from 0 to 8 return values from
callables that accept N parameters.
...this means that there are many Python-related opcodes. But
all of these opcodes share the same py prefix, and have a regular
naming scheme:
"py" + [optional context prefix] + [action name] + [optional x-time suffix]