Package: plib.stdlib
The PLIB.STDLIB package contains a number of useful packages
and modules that extend the Python standard library.Note: PLIB.STDLIB works with Python 2.7. If you are using
Python 3, see the PLIB3.STDLIB package, available athttps://pypi.org/project/plib3.stdlib.Thesetup.pyscript for PLIB.STDLIB uses thesetuputilshelper module, which helps to automate away much of the
boilerplate in Python setup scripts. This module is available
as a separate release athttps://pypi.org/project/setuputils.NOTE: Some sub-packages and modules have been removed in this
release. See the change log for details.The PLIB.STDLIB Packages and ModulesThe following modules or sub-packages are available in theplib.stdlibnamespace:Thebuiltinsmodule contains some funtions that should be
Python builtins, but aren’t. :) Importing the module adds those
functions to the built-in namespace; this is mostly useful for
interactive shells. The functions can also be imported directly
fromplib.stdlib.builtins, to make it easier to understand
where the functions are coming from in module code.Theclasstoolsmodule provides some utilities for working
with classes and class attributes.Thecmdlinemodule provides utilities useful for command
line programs and interactive shells.Thecollsub-package provides various collection classes,
including abstract collections built on thecollectionsABCs from the standard library.Thecopytoolsmodule provides functions to copy function
and code objects, whichcopy.copyin the Python standard
library just returns unchanged. This allows copies of such
objects to be made with selected attributes changed.Thecsvtoolsmodule provides useful functions for working
with CSV files.Thedecotoolsmodule provides functions and factories for
working with decorators.Thefdtoolsmodule provides utilities for working with file
descriptors.Theimpmodule provides theimport_from_modulefunction,
which should be in the standard libraryimportlibmodule
but isn’t. :)Theinisub-package implements an abstract ‘INI file’ API that
usesConfigParseron POSIX systems, and the Windows registry
on Windows systems. This API allows the configuration file
structure to be declared using Python lists and dicts.Theitersmodule provides various functions dealing with
or returning iterables.Thejsontoolsmodule provides convenience functions for
loading and saving JSON files, and for “extended” JSON that
allows “literal” Python types like tuples that standard JSON
does not support.Thelocalizemodule provides useful functions for getting
locale-specific information.Themailmodule provides a useful shortcut function for
sending email from programs.Themathlibmodule provides some additional math functions
to supplement those in the standard library.Thenetmodule provides utilities for getting information
about networks.Theoptionsmodule provides an easier-to-use overlay for
theargparsemodule which allows you to express your option
configuration in the form of Python lists, tuples, and dicts.Theostoolsmodule provides utilities for working with the
operating system.Thepostinstallmodule provides utilities for use by
post-install scripts.Theprocmodule provides two shortcut functions for getting
the output of a subprocess.Thesigsmodule provides a context manager for installing
signal handlers.Thestringsmodule provides functions and constants for
working with strings.Thesystoolsmodule provides a context manager for temporarily
changingsys.path.Thetimermodule provides functions for timing code, with
an alternate API to the standard library’stimeitmodule
that is easier to use when timing functions that you already
have as objects, instead of source code strings.Thetztoolsmodule provides some usefultzinfosubclasses
based on those in the Python docs for thedatetimemodule,
and a function to return the local system timezone name.Theutilsub-package provides theModuleProxyclass, which
is used by a number of PLIB sub-packages. See the docstrings
for the class and the sub-packages using it for more information.InstallationTo install PLIB.STDLIB, you can simply run:$ python setup.py installat a shell prompt from the directory into which you
unzipped the source tarball (the same directory that this
README file is in). This will install PLIB and then
run each of the post-install scripts in the scripts
directory.