pyinit Opcodes
Prev | Orchestra Opcodes and Operators | Next

## pyinit Opcodes

pyinit — Initialize the Python interpreter.

## Syntax

                pyinit

## Description

In the command-line version of Csound, you must first invoke the pyinit opcode in the orchestra header to initialize the Python interpreter, before using any of the other Python opcodes.

But if you use the Python opcodes in the CsoundVST version of Csound, you need not invoke pyinit, because CsoundVST automatically initializes the Python interpreter for you. In addition, CsoundVST automatically creates a Python interface to the Csound API, in the form a global instance of the `CsoundVST.CppSound` class named `csound`. Therefore, Python code written in the Csound orchestra has access to the global `csound` object.

## Credits

Copyright (c) 2002 by Maurizio Umberto Puxeddu. All rights reserved. Portions copyright (c) 2004 and 2005 by Michael Gogins. This document has been updated Sunday 25 July 2004 and 1 February 2005 by Michael Gogins.

Prev | Up | Next
pyexec Opcodes | Home | pyrun Opcodes