triple: module; search; path
single: path (in module sys)
-The basic initialization function is :cfunc:`Py_Initialize`. This initializes
+The basic initialization function is :c:func:`Py_Initialize`. This initializes
the table of loaded modules, and creates the fundamental modules
- :mod:`builtins`, :mod:`__main__`, :mod:`sys`, and :mod:`exceptions`. It also
+ :mod:`builtins`, :mod:`__main__`, and :mod:`sys`. It also
initializes the module search path (``sys.path``).
-.. index:: single: PySys_SetArgv()
+.. index:: single: PySys_SetArgvEx()
-:cfunc:`Py_Initialize` does not set the "script argument list" (``sys.argv``).
-If this variable is needed by Python code that will be executed later, it must
-be set explicitly with a call to ``PySys_SetArgv(argc, argv)`` subsequent to
-the call to :cfunc:`Py_Initialize`.
+:c:func:`Py_Initialize` does not set the "script argument list" (``sys.argv``).
+If this variable is needed by Python code that will be executed later, it must
+be set explicitly with a call to ``PySys_SetArgvEx(argc, argv, updatepath)``
+after the call to :c:func:`Py_Initialize`.
On most systems (in particular, on Unix and Windows, although the details are
-slightly different), :cfunc:`Py_Initialize` calculates the module search path
+slightly different), :c:func:`Py_Initialize` calculates the module search path
based upon its best guess for the location of the standard Python interpreter
executable, assuming that the Python library is found in a fixed location
relative to the Python interpreter executable. In particular, it looks for a
Describes an object method. The parameters should not include the ``self``
parameter. The description should include similar information to that
- described for ``function``.
+ described for ``function``. This method should be nested in a class
+ method, like in the example above.
+.. describe:: decoratormethod
+
+ Same as ``decorator``, but for decorators that are methods.
+
+ Refer to a decorator method using the ``:meth:`` role.
+
.. describe:: opcode
Describes a Python :term:`bytecode` instruction.
list = d.keys() # return a list of all existing keys (slow!)
Future versions may change the order in which implementations are
- tested for existence, add interfaces to other dbm-like
+ tested for existence, and add interfaces to other dbm-like
implementations.
-
- The open function has an optional second argument. This can be 'r',
- for read-only access, 'w', for read-write access of an existing
- database, 'c' for read-write access to a new or existing database, and
- 'n' for read-write access to a new database. The default is 'r'.
-
- Note: 'r' and 'w' fail if the database doesn't exist; 'c' creates it
- only if it doesn't exist; and 'n' always creates a new database.
"""
-__all__ = ['open', 'whichdb', 'error', 'error']
+__all__ = ['open', 'whichdb', 'error']
import io
import os