1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<!DOCTYPE html>
<html>
<head>
<link rel=stylesheet href=style.css />
<link rel=icon href=CZI-new-logo.png />
</head>
<body>
<main>
<div class="goto-index"><a href="index.html">Table of contents</a></div>
<h1>Python API</h1>
<p>
On Ubuntu 16.04 and Ubuntu 18.04, a Shasta build
includes a shared library <code>shasta-build/shasta-install/shasta.so</code>
which behaves as a Python module. Python code can <code>import shasta</code>
to use the functionality provided by the module.
To create documentation for the Python API, see directions in
<code>shasta/docs/PythonApi/README</code>.
For the Python interpreter to find the module you must either:
<ul>
<li>Make sure the Python script that contains <code>import shasta</code> is in the same directory
that contains <code>shasta.so</code> (<code>shasta-build/shasta-install/bin</code>).
All Python scripts provided with Shasta are copied
to that location during the build process.
<li>Or, set environment variable <code>PYTHONPATH</code>
to the name of the directory where <code>shasta.so</code> is located.
</ul>
<div class="goto-index"><a href="index.html">Table of contents</a></div>
</main>
</body>
</html>
|