added information on accessing docstrings
parent
29b750659d
commit
103379b6ba
|
@ -33,6 +33,40 @@ import mitsuba
|
|||
For an overview of the currently exposed API subset, please refer
|
||||
to the following page: \url{http://www.mitsuba-renderer.org/api/group__libpython.html}.
|
||||
|
||||
\subsubsection{Accessing signatures in an interactive Python shell}
|
||||
The plugin exports comprehensive Python-style docstrings, hence
|
||||
the following is an alternative and convenient way of getting information on
|
||||
classes, function, or entire namespaces when running an interactive Python shell.
|
||||
\begin{shell}
|
||||
>>> help(mitsuba.core.Bitmap) # (can be applied to namespaces, classes, functions, etc.)
|
||||
|
||||
class Bitmap(Object)
|
||||
| Method resolution order:
|
||||
| Bitmap
|
||||
| Object
|
||||
| Boost.Python.instance
|
||||
| __builtin__.object
|
||||
|
|
||||
| Methods defined here:
|
||||
| __init__(...)
|
||||
| __init__( (object)arg1, (EPixelFormat)arg2, (EComponentFormat)arg3, (Vector2i)arg4) -> None :
|
||||
| C++ signature :
|
||||
| void __init__(_object*,mitsuba::Bitmap::EPixelFormat,mitsuba::Bitmap::EComponentFormat,mitsuba::TVector2<int>)
|
||||
|
|
||||
| __init__( (object)arg1, (EFileFormat)arg2, (Stream)arg3) -> None :
|
||||
| C++ signature :
|
||||
| void __init__(_object*,mitsuba::Bitmap::EFileFormat,mitsuba::Stream*)
|
||||
|
|
||||
| clear(...)
|
||||
| clear( (Bitmap)arg1) -> None :
|
||||
| C++ signature :
|
||||
| void clear(mitsuba::Bitmap {lvalue})
|
||||
...
|
||||
\end{shell}
|
||||
The docstrings list the currently exported functionality, as well as C++ and Python signatures, but they
|
||||
don't document what these functions actually do. The web API documentation is the preferred source for
|
||||
this information.
|
||||
|
||||
\subsection{Basics}
|
||||
Generally, the Python API tries to mimic the C++ API as closely as possible.
|
||||
Where applicable, the Python classes and methods replicate overloaded operators,
|
||||
|
|
Loading…
Reference in New Issue