Basic Usage
-----------
-.. function:: dump(obj, fp[, skipkeys[, ensure_ascii[, check_circular[, allow_nan[, cls[, indent[, separators[, default[, **kw]]]]]]]]]])
+.. function:: dump(obj, fp, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, **kw)
Serialize *obj* as a JSON formatted stream to *fp* (a ``.write()``-supporting
file-like object).
:class:`bytes` objects. Therefore, ``fp.write()`` must support :class:`str`
input.
-
If *check_circular* is ``False`` (default: ``True``), then the circular
reference check for container types will be skipped and a circular reference
will result in an :exc:`OverflowError` (or worse).
*cls* kwarg.
-.. function:: dumps(obj[, skipkeys[, ensure_ascii[, check_circular[, allow_nan[, cls[, indent[, separators[, default[, **kw]]]]]]]]]])
+.. function:: dumps(obj, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, **kw)
Serialize *obj* to a JSON formatted :class:`str`. The arguments have the
same meaning as in :func:`dump`.
-.. function:: load(fp[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, object_pairs_hook[, **kw]]]]]]]])
+.. function:: load(fp, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
Deserialize *fp* (a ``.read()``-supporting file-like object containing a JSON
document) to a Python object.
class.
-.. function:: loads(s[, encoding[, cls[, object_hook[, parse_float[, parse_int[, parse_constant[, object_pairs_hook[, **kw]]]]]]]])
+.. function:: loads(s, encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw)
Deserialize *s* (a :class:`str` or :class:`unicode` instance containing a JSON
document) to a Python object.
Encoders and decoders
---------------------
-.. class:: JSONDecoder([encoding[, object_hook[, parse_float[, parse_int[, parse_constant[, strict[, object_pairs_hook]]]]]]])
+.. class:: JSONDecoder(object_hook=None, parse_float=None, parse_int=None, parse_constant=None, strict=True, object_pairs_hook=None)
Simple JSON decoder.
extraneous data at the end.
-.. class:: JSONEncoder([skipkeys[, ensure_ascii[, check_circular[, allow_nan[, sort_keys[, indent[, separators[, default]]]]]]]])
+.. class:: JSONEncoder(skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
Extensible JSON encoder for Python data structures.
-
:mod:`keyword` --- Testing for Python keywords
==============================================
-
.. _language:
************************
-
:mod:`linecache` --- Random access to text lines
================================================
The :mod:`linecache` module defines the following functions:
-.. function:: getline(filename, lineno[, module_globals])
+.. function:: getline(filename, lineno, module_globals=None)
Get line *lineno* from file named *filename*. This function will never throw an
exception --- it will return ``''`` on errors (the terminating newline character
previously read using :func:`getline`.
-.. function:: checkcache([filename])
+.. function:: checkcache(filename=None)
Check the cache for validity. Use this function if files in the cache may have
changed on disk, and you require the updated version. If *filename* is omitted,
it will check all the entries in the cache.
+
Example::
>>> import linecache
-
:mod:`locale` --- Internationalization services
===============================================
Exception raised when :func:`setlocale` fails.
-.. function:: setlocale(category[, locale])
+.. function:: setlocale(category, locale=None)
If *locale* is specified, it may be a string, a tuple of the form ``(language
code, encoding)``, or ``None``. If it is a tuple, it is converted to a string
constants are available in the locale module.
-.. function:: getdefaultlocale([envvars])
+.. function:: getdefaultlocale(envvars=('LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE'))
Tries to determine the default locale settings and returns them as a tuple of
the form ``(language code, encoding)``.
To maintain compatibility with other platforms, not only the :envvar:`LANG`
variable is tested, but a list of variables given as envvars parameter. The
- first found to be defined will be used. *envvars* defaults to the search path
- used in GNU gettext; it must always contain the variable name ``LANG``. The GNU
- gettext search path contains ``'LANGUAGE'``, ``'LC_ALL'``, ``'LC_CTYPE'``, and
- ``'LANG'``, in that order.
+ first found to be defined will be used. *envvars* defaults to the search
+ path used in GNU gettext; it must always contain the variable name
+ ``'LANG'``. The GNU gettext search path contains ``'LC_ALL'``,
+ ``'LC_CTYPE'``, ``'LANG'`` and ``'LANGUAGE'``, in that order.
Except for the code ``'C'``, the language code corresponds to :rfc:`1766`.
*language code* and *encoding* may be ``None`` if their values cannot be
determined.
-.. function:: getlocale([category])
+.. function:: getlocale(category=LC_CTYPE)
Returns the current setting for the given locale category as sequence containing
*language code*, *encoding*. *category* may be one of the :const:`LC_\*` values
determined.
-.. function:: getpreferredencoding([do_setlocale])
+.. function:: getpreferredencoding(do_setlocale=True)
Return the encoding used for text data, according to user preferences. User
preferences are expressed differently on different systems, and might not be
encoding for the locale code just like :func:`setlocale`.
-.. function:: resetlocale([category])
+.. function:: resetlocale(category=LC_ALL)
Sets the locale for *category* to the default setting.
sequence of strings.
-.. function:: format(format, val[, grouping[, monetary]])
+.. function:: format(format, val, grouping=False, monetary=False)
Formats a number *val* according to the current :const:`LC_NUMERIC` setting.
The format follows the conventions of the ``%`` operator. For floating point
For whole format strings, use :func:`format_string`.
-.. function:: format_string(format, val[, grouping])
+.. function:: format_string(format, val, grouping=False)
Processes formatting specifiers as in ``format % val``, but takes the current
locale settings into account.
-.. function:: currency(val[, symbol[, grouping[, international]]])
+.. function:: currency(val, symbol=True, grouping=False, international=False)
Formats a number *val* according to the current :const:`LC_MONETARY` settings.
functions.
-.. function:: getLogger([name])
+.. function:: getLogger(name=None)
- Return a logger with the specified name or, if no name is specified, return a
+ Return a logger with the specified name or, if name is ``None``, return a
logger which is the root logger of the hierarchy. If specified, the name is
typically a dot-separated hierarchical name like *"a"*, *"a.b"* or *"a.b.c.d"*.
Choice of these names is entirely up to the developer who is using logging.
# ... override behaviour here
-.. function:: debug(msg[, *args[, **kwargs]])
+.. function:: debug(msg, *args, **kwargs)
Logs a message with level :const:`DEBUG` on the root logger. The *msg* is the
message format string, and the *args* are the arguments which are merged into
d = {'clientip': '192.168.0.1', 'user': 'fbloggs'}
logging.warning("Protocol problem: %s", "connection reset", extra=d)
- would print something like ::
+ would print something like ::
2006-02-08 22:20:02,165 192.168.0.1 fbloggs Protocol problem: connection reset
:class:`Formatter`\ s would be used with particular :class:`Handler`\ s.
-.. function:: info(msg[, *args[, **kwargs]])
+.. function:: info(msg, *args, **kwargs)
Logs a message with level :const:`INFO` on the root logger. The arguments are
interpreted as for :func:`debug`.
-.. function:: warning(msg[, *args[, **kwargs]])
+.. function:: warning(msg, *args, **kwargs)
Logs a message with level :const:`WARNING` on the root logger. The arguments are
interpreted as for :func:`debug`.
-.. function:: error(msg[, *args[, **kwargs]])
+.. function:: error(msg, *args, **kwargs)
Logs a message with level :const:`ERROR` on the root logger. The arguments are
interpreted as for :func:`debug`.
-.. function:: critical(msg[, *args[, **kwargs]])
+.. function:: critical(msg, *args, **kwargs)
Logs a message with level :const:`CRITICAL` on the root logger. The arguments
are interpreted as for :func:`debug`.
-.. function:: exception(msg[, *args])
+.. function:: exception(msg, *args)
Logs a message with level :const:`ERROR` on the root logger. The arguments are
interpreted as for :func:`debug`. Exception info is added to the logging
message. This function should only be called from an exception handler.
-.. function:: log(level, msg[, *args[, **kwargs]])
+.. function:: log(level, msg, *args, **kwargs)
Logs a message with level *level* on the root logger. The other arguments are
interpreted as for :func:`debug`.
it as a :class:`LogRecord` instance at the receiving end.
-.. function:: basicConfig([**kwargs])
+.. function:: basicConfig(**kwargs)
Does basic configuration for the logging system by creating a
:class:`StreamHandler` with a default :class:`Formatter` and adding it to the
:const:`NOTSET` is found, and that value is returned.
-.. method:: Logger.debug(msg[, *args[, **kwargs]])
+.. method:: Logger.debug(msg, *args, **kwargs)
Logs a message with level :const:`DEBUG` on this logger. The *msg* is the
message format string, and the *args* are the arguments which are merged into
:class:`Formatter`\ s would be used with particular :class:`Handler`\ s.
-.. method:: Logger.info(msg[, *args[, **kwargs]])
+.. method:: Logger.info(msg, *args, **kwargs)
Logs a message with level :const:`INFO` on this logger. The arguments are
interpreted as for :meth:`debug`.
-.. method:: Logger.warning(msg[, *args[, **kwargs]])
+.. method:: Logger.warning(msg, *args, **kwargs)
Logs a message with level :const:`WARNING` on this logger. The arguments are
interpreted as for :meth:`debug`.
-.. method:: Logger.error(msg[, *args[, **kwargs]])
+.. method:: Logger.error(msg, *args, **kwargs)
Logs a message with level :const:`ERROR` on this logger. The arguments are
interpreted as for :meth:`debug`.
-.. method:: Logger.critical(msg[, *args[, **kwargs]])
+.. method:: Logger.critical(msg, *args, **kwargs)
Logs a message with level :const:`CRITICAL` on this logger. The arguments are
interpreted as for :meth:`debug`.
-.. method:: Logger.log(lvl, msg[, *args[, **kwargs]])
+.. method:: Logger.log(lvl, msg, *args, **kwargs)
Logs a message with integer level *lvl* on this logger. The other arguments are
interpreted as for :meth:`debug`.
-.. method:: Logger.exception(msg[, *args])
+.. method:: Logger.exception(msg, *args)
Logs a message with level :const:`ERROR` on this logger. The arguments are
interpreted as for :meth:`debug`. Exception info is added to the logging
Logger-level filtering is applied using :meth:`filter`.
-.. method:: Logger.makeRecord(name, lvl, fn, lno, msg, args, exc_info [, func, extra])
+.. method:: Logger.makeRecord(name, lvl, fn, lno, msg, args, exc_info, func=None, extra=None)
This is a factory method which can be overridden in subclasses to create
specialized :class:`LogRecord` instances.
and :meth:`flush` methods).
-.. class:: StreamHandler([strm])
+.. class:: StreamHandler(strm=None)
Returns a new instance of the :class:`StreamHandler` class. If *strm* is
specified, the instance will use it for logging output; otherwise, *sys.stderr*
:class:`StreamHandler`.
-.. class:: FileHandler(filename[, mode[, encoding[, delay]]])
+.. class:: FileHandler(filename, mode='a', encoding=None, delay=0)
Returns a new instance of the :class:`FileHandler` class. The specified file is
opened and used as the stream for logging. If *mode* is not specified,
module, supports rotation of disk log files.
-.. class:: RotatingFileHandler(filename[, mode[, maxBytes[, backupCount[, encoding[, delay]]]]])
+.. class:: RotatingFileHandler(filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=0)
Returns a new instance of the :class:`RotatingFileHandler` class. The specified
file is opened and used as the stream for logging. If *mode* is not specified,
timed intervals.
-.. class:: TimedRotatingFileHandler(filename [,when [,interval [,backupCount[, encoding[, delay[, utc]]]]]])
+.. class:: TimedRotatingFileHandler(filename, when='h', interval=1, backupCount=0, encoding=None, delay=0, utc=False)
Returns a new instance of the :class:`TimedRotatingFileHandler` class. The
specified file is opened and used as the stream for logging. On rotating it also
supports sending logging messages to a remote or local Unix syslog.
-.. class:: SysLogHandler([address[, facility]])
+.. class:: SysLogHandler(address=('localhost', SYSLOG_UDP_PORT), facility=LOG_USER)
Returns a new instance of the :class:`SysLogHandler` class intended to
communicate with a remote Unix machine whose address is given by *address* in
extensions for Python installed.
-.. class:: NTEventLogHandler(appname[, dllname[, logtype]])
+.. class:: NTEventLogHandler(appname, dllname=None, logtype='Application')
Returns a new instance of the :class:`NTEventLogHandler` class. The *appname* is
used to define the application name as it appears in the event log. An
supports sending logging messages to an email address via SMTP.
-.. class:: SMTPHandler(mailhost, fromaddr, toaddrs, subject[, credentials])
+.. class:: SMTPHandler(mailhost, fromaddr, toaddrs, subject, credentials=None)
Returns a new instance of the :class:`SMTPHandler` class. The instance is
initialized with the from and to addresses and subject line of the email. The
overridden to implement custom flushing strategies.
-.. class:: MemoryHandler(capacity[, flushLevel [, target]])
+.. class:: MemoryHandler(capacity, flushLevel=ERROR, target=None)
Returns a new instance of the :class:`MemoryHandler` class. The instance is
initialized with a buffer size of *capacity*. If *flushLevel* is not specified,
``POST`` semantics.
-.. class:: HTTPHandler(host, url[, method])
+.. class:: HTTPHandler(host, url, method='GET')
Returns a new instance of the :class:`HTTPHandler` class. The instance is
initialized with a host address, url and HTTP method. The *host* can be of the
+-------------------------+-----------------------------------------------+
-.. class:: Formatter([fmt[, datefmt]])
+.. class:: Formatter(fmt=None, datefmt=None)
- Returns a new instance of the :class:`Formatter` class. The instance is
- initialized with a format string for the message as a whole, as well as a format
- string for the date/time portion of a message. If no *fmt* is specified,
- ``'%(message)s'`` is used. If no *datefmt* is specified, the ISO8601 date format
- is used.
+ Returns a new instance of the :class:`Formatter` class. The instance is
+ initialized with a format string for the message as a whole, as well as a
+ format string for the date/time portion of a message. If no *fmt* is
+ specified, ``'%(message)s'`` is used. If no *datefmt* is specified, the
+ ISO8601 date format is used.
.. method:: format(record)
recalculates it afresh.
- .. method:: formatTime(record[, datefmt])
+ .. method:: formatTime(record, datefmt=None)
This method should be called from :meth:`format` by a formatter which
wants to make use of a formatted time. This method can be overridden in
initialized with the empty string, all events are passed.
-.. class:: Filter([name])
+.. class:: Filter(name='')
Returns an instance of the :class:`Filter` class. If *name* is specified, it
names a logger which, together with its children, will have its events allowed
- through the filter. If no name is specified, allows every event.
+ through the filter. If *name* is the empty string, allows every event.
.. method:: filter(record)
made, and any exception information to be logged.
-.. class:: LogRecord(name, lvl, pathname, lineno, msg, args, exc_info [, func])
+.. class:: LogRecord(name, lvl, pathname, lineno, msg, args, exc_info, func=None)
Returns an instance of :class:`LogRecord` initialized with interesting
information. The *name* is the logger name; *lvl* is the numeric level;
:mod:`logging` or :mod:`logging.handlers`.
-.. function:: fileConfig(fname[, defaults])
+.. function:: fileConfig(fname, defaults=None, disable_existing_loggers=True)
Reads the logging configuration from a :mod:`configparser`\-format file named
*fname*. This function can be called several times from an application,
and load the chosen configuration). Defaults to be passed to the ConfigParser
can be specified in the *defaults* argument.
+ If *disable_existing_loggers* is true, any existing loggers that are not
+ children of named loggers will be disabled.
+
-.. function:: listen([port])
+.. function:: listen(port=DEFAULT_LOGGING_CONFIG_PORT)
Starts up a socket server on the specified port, and listens for new
configurations. If no port is specified, the module's default
-
:mod:`macpath` --- Mac OS 9 path manipulation functions
=======================================================
-
:mod:`mailbox` --- Manipulate mailboxes in various formats
==========================================================
:class:`Mailbox` objects
------------------------
-
.. class:: Mailbox
A mailbox, which may be inspected and modified.
when the :class:`Mailbox` instance was initialized.
- .. method:: get(key[, default=None])
+ .. method:: get(key, default=None)
__getitem__(key)
Return a representation of the message corresponding to *key*. If no such
Delete all messages from the mailbox.
- .. method:: pop(key[, default])
+ .. method:: pop(key, default=None)
Return a representation of the message corresponding to *key* and delete
- the message. If no such message exists, return *default* if it was
- supplied or else raise a :exc:`KeyError` exception. The message is
+ the message. If no such message exists, return *default*. The message is
represented as an instance of the appropriate format-specific
:class:`Message` subclass unless a custom message factory was specified
when the :class:`Mailbox` instance was initialized.
^^^^^^^^^^^^^^^^
-.. class:: Maildir(dirname[, factory=None[, create=True]])
+.. class:: Maildir(dirname, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in Maildir format. Parameter
*factory* is a callable object that accepts a file-like message representation
^^^^^^^^^^^^^
-.. class:: mbox(path[, factory=None[, create=True]])
+.. class:: mbox(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in mbox format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
^^^^^^^^^^^
-.. class:: MH(path[, factory=None[, create=True]])
+.. class:: MH(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in MH format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
^^^^^^^^^^^^^^
-.. class:: Babyl(path[, factory=None[, create=True]])
+.. class:: Babyl(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in Babyl format. Parameter
*factory* is a callable object that accepts a file-like message representation
^^^^^^^^^^^^^
-.. class:: MMDF(path[, factory=None[, create=True]])
+.. class:: MMDF(path, factory=None, create=True)
A subclass of :class:`Mailbox` for mailboxes in MMDF format. Parameter *factory*
is a callable object that accepts a file-like message representation (which
------------------------
-.. class:: Message([message])
+.. class:: Message(message=None)
A subclass of the :mod:`email.Message` module's :class:`Message`. Subclasses of
:class:`mailbox.Message` add mailbox-format-specific state and behavior.
^^^^^^^^^^^^^^^^^^^^^^^
-.. class:: MaildirMessage([message])
+.. class:: MaildirMessage(message=None)
A message with Maildir-specific behaviors. Parameter *message* has the same
meaning as with the :class:`Message` constructor.
^^^^^^^^^^^^^^^^^^^^
-.. class:: mboxMessage([message])
+.. class:: mboxMessage(message=None)
A message with mbox-specific behaviors. Parameter *message* has the same meaning
as with the :class:`Message` constructor.
are excluded.
- .. method:: set_from(from_[, time_=None])
+ .. method:: set_from(from_, time_=None)
Set the "From " line to *from_*, which should be specified without a
leading "From " or trailing newline. For convenience, *time_* may be
^^^^^^^^^^^^^^^^^^
-.. class:: MHMessage([message])
+.. class:: MHMessage(message=None)
A message with MH-specific behaviors. Parameter *message* has the same meaning
as with the :class:`Message` constructor.
^^^^^^^^^^^^^^^^^^^^^
-.. class:: BabylMessage([message])
+.. class:: BabylMessage(message=None)
A message with Babyl-specific behaviors. Parameter *message* has the same
meaning as with the :class:`Message` constructor.
^^^^^^^^^^^^^^^^^^^^
-.. class:: MMDFMessage([message])
+.. class:: MMDFMessage(message=None)
A message with MMDF-specific behaviors. Parameter *message* has the same meaning
as with the :class:`Message` constructor.
are excluded.
- .. method:: set_from(from_[, time_=None])
+ .. method:: set_from(from_, time_=None)
Set the "From " line to *from_*, which should be specified without a
leading "From " or trailing newline. For convenience, *time_* may be
:synopsis: Mailcap file handling.
-
Mailcap files are used to configure how MIME-aware applications such as mail
readers and Web browsers react to files with different MIME types. (The name
"mailcap" is derived from the phrase "mail capability".) For example, a mailcap
standard. However, mailcap files are supported on most Unix systems.
-.. function:: findmatch(caps, MIMEtype[, key[, filename[, plist]]])
+.. function:: findmatch(caps, MIMEtype, key='view', filename='/dev/null', plist=[])
Return a 2-tuple; the first element is a string containing the command line to
be executed (which can be passed to :func:`os.system`), and the second element
-
.. _markup:
**********************************
-
:mod:`marshal` --- Internal Python object serialization
=======================================================
-
:mod:`math` --- Mathematical functions
======================================
-
:mod:`mimetypes` --- Map filenames to MIME types
================================================
the information :func:`init` sets up.
-.. function:: guess_type(filename[, strict])
+.. function:: guess_type(url, strict=True)
.. index:: pair: MIME; headers
are also recognized.
-.. function:: guess_all_extensions(type[, strict])
+.. function:: guess_all_extensions(type, strict=True)
Guess the extensions for a file based on its MIME type, given by *type*. The
return value is a list of strings giving all possible filename extensions,
Optional *strict* has the same meaning as with the :func:`guess_type` function.
-.. function:: guess_extension(type[, strict])
+.. function:: guess_extension(type, strict=True)
Guess the extension for a file based on its MIME type, given by *type*. The
return value is a string giving a filename extension, including the leading dot
behavior of the module.
-.. function:: init([files])
+.. function:: init(files=None)
Initialize the internal data structures. If given, *files* must be a sequence
of file names which should be used to augment the default type map. If omitted,
does not exist or cannot be read, ``None`` is returned.
-.. function:: add_type(type, ext[, strict])
+.. function:: add_type(type, ext, strict=True)
Add a mapping from the mimetype *type* to the extension *ext*. When the
extension is already known, the new type will replace the old one. When the type
than one MIME-type database:
-.. class:: MimeTypes([filenames])
+.. class:: MimeTypes(filenames=(), strict=True)
This class represents a MIME-types database. By default, it provides access to
the same database as the rest of this module. The initial database is a copy of
module.
-.. method:: MimeTypes.guess_extension(type[, strict])
+.. method:: MimeTypes.guess_extension(type, strict=True)
Similar to the :func:`guess_extension` function, using the tables stored as part
of the object.
-.. method:: MimeTypes.guess_type(url[, strict])
+.. method:: MimeTypes.guess_type(url, strict=True)
Similar to the :func:`guess_type` function, using the tables stored as part of
the object.
-
.. _misc:
**********************
-
.. _mmedia:
*******************
-
:mod:`mmap` --- Memory-mapped file support
==========================================
To map anonymous memory, -1 should be passed as the fileno along with the length.
-.. class:: mmap(fileno, length[, tagname[, access[, offset]]])
+.. class:: mmap(fileno, length, tagname=None, access=ACCESS_DEFAULT[, offset])
**(Windows version)** Maps *length* bytes from the file specified by the
file handle *fileno*, and creates a mmap object. If *length* is larger
defaults to 0. *offset* must be a multiple of the ALLOCATIONGRANULARITY.
-.. class:: mmap(fileno, length[, flags[, prot[, access[, offset]]]])
+.. class:: mmap(fileno, length, flags=MAP_SHARED, prot=PROT_WRITE|PROT_READ, access=ACCESS_DEFAULT[, offset])
:noindex:
**(Unix version)** Maps *length* bytes from the file specified by the file
Returns ``-1`` on failure.
- .. method:: flush([offset, size])
+ .. method:: flush([offset[, size]])
Flushes changes made to the in-memory copy of a file back to disk. Without
use of this call there is no guarantee that changes are written back before
-
:mod:`modulefinder` --- Find modules used by a script
=====================================================
package replaces the :mod:`xml` package.
-.. class:: ModuleFinder([path=None, debug=0, excludes=[], replace_paths=[]])
+.. class:: ModuleFinder(path=None, debug=0, excludes=[], replace_paths=[])
This class provides :meth:`run_script` and :meth:`report` methods to determine
the set of modules imported by a script. *path* can be a list of directories to
-
.. _modules:
*****************
the default flags that new components get.
- .. method:: start_component([component[, feature[, flags[, keyfile[, uuid]]]]])
+ .. method:: start_component(component=None, feature=None, flags=None, keyfile=None, uuid=None)
Add an entry to the Component table, and make this component the current
component for this directory. If no component name is given, the directory
is given, the KeyPath is left null in the Component table.
- .. method:: add_file(file[, src[, version[, language]]])
+ .. method:: add_file(file, src=None, version=None, language=None)
Add a file to the current component of the directory, starting a new one
if there is no current component. By default, the file name in the source
and a *language* can be specified for the entry in the File table.
- .. method:: glob(pattern[, exclude])
+ .. method:: glob(pattern, exclude=None)
Add a list of files to the current component as specified in the glob
pattern. Individual files can be excluded in the *exclude* list.
--------
-.. class:: Feature(database, id, title, desc, display[, level=1[, parent[, directory[, attributes=0]]]])
+.. class:: Feature(db, id, title, desc, display, level=1, parent=None, directory=None, attributes=0)
Add a new record to the ``Feature`` table, using the values *id*, *parent.id*,
*title*, *desc*, *display*, *level*, *directory*, and *attributes*. The
belongs to, and *name* is the control's name.
- .. method:: event(event, argument[, condition=1[, ordering]])
+ .. method:: event(event, argument, condition=1, ordering=None)
Make an entry into the ``ControlEvent`` table for this control.
that gets set when a radio button is selected.
- .. method:: add(name, x, y, width, height, text [, value])
+ .. method:: add(name, x, y, width, height, text, value=None)
Add a radio button named *name* to the group, at the coordinates *x*, *y*,
- *width*, *height*, and with the label *text*. If *value* is omitted, it
+ *width*, *height*, and with the label *text*. If *value* is ``None``, it
defaults to *name*.
-
:mod:`msvcrt` -- Useful routines from the MS VC++ runtime
=========================================================