-
:mod:`abc` --- Abstract Base Classes
====================================
-
.. _allos:
*********************************
-
.. _archiving:
******************************
-
:mod:`array` --- Efficient arrays of numeric values
===================================================
-
:mod:`asynchat` --- Asynchronous socket command/response handler
================================================================
-
:mod:`asyncore` --- Asynchronous socket handler
===============================================
-
:mod:`atexit` --- Exit handlers
===============================
-
:mod:`audioop` --- Manipulate raw audio data
============================================
-
:mod:`base64` --- RFC 3548: Base16, Base32, Base64 Data Encodings
=================================================================
-
:mod:`binascii` --- Convert between binary and ASCII
====================================================
-
:mod:`code` --- Interpreter base classes
========================================
:synopsis: Facilities to implement read-eval-print loops.
-
The ``code`` module provides facilities to implement read-eval-print loops in
Python. Two classes and convenience functions are included which can be used to
build applications which provide an interactive interpreter prompt.
-
:mod:`codeop` --- Compile Python code
=====================================
-
:mod:`collections` --- Container datatypes
==========================================
-
:mod:`compileall` --- Byte-compile Python libraries
===================================================
-
:mod:`contextlib` --- Utilities for :keyword:`with`\ -statement contexts.
=========================================================================
-
:mod:`copy` --- Shallow and deep copy operations
================================================
-
:mod:`copyreg` --- Register :mod:`pickle` support functions
-============================================================
+===========================================================
.. module:: copyreg
:synopsis: Register pickle support functions.
-
:mod:`crypt` --- Function to check Unix passwords
=================================================
-
.. _crypto:
**********************
-
:mod:`csv` --- CSV File Reading and Writing
===========================================
-
-:mod:`ctypes` --- A foreign function library for Python.
-========================================================
+:mod:`ctypes` --- A foreign function library for Python
+=======================================================
.. module:: ctypes
:synopsis: A foreign function library for Python.
-
:mod:`curses.ascii` --- Utilities for ASCII characters
======================================================
-
-:mod:`curses.panel` --- A panel stack extension for curses.
-===========================================================
+:mod:`curses.panel` --- A panel stack extension for curses
+==========================================================
.. module:: curses.panel
:synopsis: A panel stack extension that adds depth to curses windows.
-
:mod:`curses` --- Terminal handling for character-cell displays
===============================================================
.. module:: curses
- :synopsis: An interface to the curses library, providing portable terminal handling.
+ :synopsis: An interface to the curses library, providing portable
+ terminal handling.
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
.. sectionauthor:: Eric Raymond <esr@thyrsus.com>
-
.. _custominterp:
**************************
-
.. _datatypes:
**********
-
:mod:`decimal` --- Decimal fixed point and floating point arithmetic
====================================================================
-
.. _development:
*****************
-
:mod:`dis` --- Disassembler for Python bytecode
===============================================
:synopsis: Disassembler for Python bytecode.
-The :mod:`dis` module supports the analysis of Python :term:`bytecode` by disassembling
-it. Since there is no Python assembler, this module defines the Python assembly
-language. The Python bytecode which this module takes as an input is defined
-in the file :file:`Include/opcode.h` and used by the compiler and the
-interpreter.
+The :mod:`dis` module supports the analysis of Python :term:`bytecode` by
+disassembling it. Since there is no Python assembler, this module defines the
+Python assembly language. The Python bytecode which this module takes as an
+input is defined in the file :file:`Include/opcode.h` and used by the compiler
+and the interpreter.
Example: Given the function :func:`myfunc`::
-
:mod:`distutils` --- Building and installing Python modules
===========================================================
.. module:: distutils
- :synopsis: Support for building and installing Python modules into an existing Python
- installation.
+ :synopsis: Support for building and installing Python modules into an
+ existing Python installation.
.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
.. seealso::
:ref:`distutils-index`
- The manual for developers and packagers of Python modules. This describes how
- to prepare :mod:`distutils`\ -based packages so that they may be easily
- installed into an existing Python installation.
+ The manual for developers and packagers of Python modules. This describes
+ how to prepare :mod:`distutils`\ -based packages so that they may be
+ easily installed into an existing Python installation.
:ref:`install-index`
- An "administrators" manual which includes information on installing modules into
- an existing Python installation. You do not need to be a Python programmer to
- read this manual.
+ An "administrators" manual which includes information on installing
+ modules into an existing Python installation. You do not need to be a
+ Python programmer to read this manual.
-
:mod:`errno` --- Standard errno system symbols
==============================================
-
:mod:`fcntl` --- The :func:`fcntl` and :func:`ioctl` system calls
=================================================================
so long as the buffer you pass is as least as long as what the operating system
wants to put there, things should work.
- If *mutate_flag* is true (the default), then the buffer is (in effect) passed to the
- underlying :func:`ioctl` system call, the latter's return code is passed back to
- the calling Python, and the buffer's new contents reflect the action of the
- :func:`ioctl`. This is a slight simplification, because if the supplied buffer
- is less than 1024 bytes long it is first copied into a static buffer 1024 bytes
- long which is then passed to :func:`ioctl` and copied back into the supplied
- buffer.
+ If *mutate_flag* is true (the default), then the buffer is (in effect) passed
+ to the underlying :func:`ioctl` system call, the latter's return code is
+ passed back to the calling Python, and the buffer's new contents reflect the
+ action of the :func:`ioctl`. This is a slight simplification, because if the
+ supplied buffer is less than 1024 bytes long it is first copied into a static
+ buffer 1024 bytes long which is then passed to :func:`ioctl` and copied back
+ into the supplied buffer.
An example::
-
:mod:`filecmp` --- File and Directory Comparisons
=================================================
The :mod:`filecmp` module defines the following functions:
-.. function:: cmp(f1, f2[, shallow])
+.. function:: cmp(f1, f2, shallow=True)
Compare the files named *f1* and *f2*, returning ``True`` if they seem equal,
``False`` otherwise.
portability and efficiency.
-.. function:: cmpfiles(dir1, dir2, common[, shallow])
+.. function:: cmpfiles(dir1, dir2, common, shallow=True)
Compare the files in the two directories *dir1* and *dir2* whose names are
given by *common*.
:class:`dircmp` instances are built using this constructor:
-.. class:: dircmp(a, b[, ignore[, hide]])
+.. class:: dircmp(a, b, ignore=None, hide=None)
Construct a new directory comparison object, to compare the directories *a* and
*b*. *ignore* is a list of names to ignore, and defaults to ``['RCS', 'CVS',
.. attribute:: subdirs
- A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp` objects.
+ A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp`
+ objects.
-
.. _fileformats:
************
The following function is the primary interface of this module:
-.. function:: input([files[, inplace[, backup[, mode[, openhook]]]]])
+.. function:: input(files=None, inplace=False, backup='', bufsize=0, mode='r', openhook=None)
Create an instance of the :class:`FileInput` class. The instance will be used
as global state for the functions of this module, and is also returned to use
available for subclassing as well:
-.. class:: FileInput([files[, inplace[, backup[, mode[, openhook]]]]])
+.. class:: FileInput(files=None, inplace=False, backup='', bufsize=0, mode='r', openhook=None)
Class :class:`FileInput` is the implementation; its methods :meth:`filename`,
:meth:`fileno`, :meth:`lineno`, :meth:`filelineno`, :meth:`isfirstline`,
-
.. _filesys:
*************************
-
:mod:`fnmatch` --- Unix filename pattern matching
=================================================
:const:`AS_IS` values, is passed to the writer's :meth:`new_styles` method.
-.. method:: formatter.pop_style([n=1])
+.. method:: formatter.pop_style(n=1)
Pop the last *n* style specifications passed to :meth:`push_style`. A tuple
representing the revised stack, including :const:`AS_IS` values, is passed to
Set the spacing style for the writer.
-.. method:: formatter.assert_line_data([flag=1])
+.. method:: formatter.assert_line_data(flag=1)
Inform the formatter that data has been added to the current paragraph
out-of-band. This should be used when the writer has been manipulated
applications may use one of these classes without modification or subclassing.
-.. class:: NullFormatter([writer])
+.. class:: NullFormatter(writer=None)
A formatter which does nothing. If *writer* is omitted, a :class:`NullWriter`
instance is created. No methods of the writer are called by
output.
-.. class:: DumbWriter([file[, maxcol=72]])
+.. class:: DumbWriter(file=None, maxcol=72)
Simple writer class which writes output on the file object passed in as *file*
or, if *file* is omitted, on standard output. The output is simply word-wrapped
-
:mod:`fpectl` --- Floating point exception control
==================================================