This is the
pyglet documentation, generated with
See the Sphinx warnings log file for errors.
pyglet uses reStructuredText markup language for both
the Programming Guide and the docstrings embedded in the code.
It is divided into several files, which are organized by
toctree directives .
The entry point for all the documentation is
pyglet/doc/index.txt, which calls to:
pyglet/doc/programming_guide: The first page of the programming guide.
pyglet/doc/internal: Documentation for those working on Pyglet itself, such as how to make a release or how the ctypes library is used.
The API documentation is generated from the source code docstrings.
class Class1(): '''Short description. Detailed explanation, formatted as reST. Can be as detailed as it is needed. :Ivariables: `arg1` description :since: pyglet 1.2 ''' attribute1 = None '''This is an attribute. More details. ''' #: This is another attribute. attribute2 = None def __init__(self): '''Constructor :parameters: `arg1` : type description ''' self.instance_attribute = None '''This is an instance attribute. ''' def method(self): '''Short description. :returns: return description :rtype: returned type ''' def _get_property1(self): '''Getter Method :return: property1 value :rtype: property1 type ''' def _set_property1(self, value): '''Setter Method :param value: property1 value # This is the ReST style :type value: property1 type # But you can use :parameters: ''' property1 = property(_get_property1, _set_property1, doc='''Short description This is another attribute. :type: type :see: something else ''')
Pyglet has some special roles.
:deprecated: Do not use
Deprecated. Do not use
To cross-reference to any documented API member, use the following roles:
~ to show only the last part.
You can link to arbitrary locations in any document using
but pyglet has a special role
:guide: for this guide.
A section header of the guide can have an anchor like this:
.. _guide_doc_ref: Internal references ===================
It is also possible to put an anchor anywhere:
.. _my_anchor: My anchor.
And to insert a reference to an anchor: