.. vim: set fileencoding=utf-8 : .. Andre Anjos .. Wed 11 May 2011 14:15:53 CEST .. _api-section: ===== API ===== You can re-use part of the functionality of this code to input data into your own python scripts for fusing scores or any other task you might need to achieve. To do so, you need to be able to import the ``trstk`` library into your script. You should set the path leading to `trstk` so the python interpreter knows how to find it. There are two basic ways to do this. 1. Set the environment variable ``$PYTHONPATH`` to point to the directory *containing* the ``trstk``: .. code-block:: sh $ vim ./myScriptThatUsesStk.py #create the script $ export PYTHONPATH=/path/to/ScoreToolKit $ python ./myScriptThatUsesStk.py 2. Or, you can change directories to the ScoreToolKit root directory and have your scripts inside that directory. Python automatically searches the current working directory for imports: .. code-block:: sh $ cd /path/to/ScoreToolKit $ vim ./myScriptThatUsesStk.py $ python ./myScriptThatUsesStk.py Reference Manual ---------------- .. automodule:: trstk :noindex: :members: