Module compat
source code
Temporary module for allowing relax to support both Python 2 and
3.
Bzip2Fixed
Incredibly nasty hack for bzip2 files support in Python 3.0, 3.1
and 3.2.
|
GzipFixed
Incredibly nasty hack for gzipped files support in Python 3.0, 3.1
and 3.2.
|
TaskQueue
Python 2.4 and earlier Queuing class replacement.
|
file object
|
bz2_open(file,
mode=' r ' )
Abstract the numerous ways BZ2 files are handled in Python. |
source code
|
|
file object
|
gz_open(file,
mode=' r ' )
Abstract the numerous ways gzipped files are handled in Python. |
source code
|
|
unknown
|
from_iterable(items)
Implementation of the itertools.chain.from_iterable() function for
all Python versions. |
source code
|
|
unknown
|
|
|
norm(x,
ord=None,
axis=None)
Replacement numpy.linalg.norm() function to handle the axis argument
for old numpy. |
source code
|
|
|
getfullargspec_replacement(obj)
Replacement inspect.getfullargspec() function for Python versions
without it. |
source code
|
|
|
getfullargspec(obj)
Replacement inspect.getfullargspec() function for Python versions
without it. |
source code
|
|
unicode
|
|
|
bz2_module = True
|
|
bz2_module_message = message.args [0]
|
|
gzip_module = True
|
|
message = sys.exc_info() [1]
|
|
gzip_module_message = message.args [0]
|
|
io_module = False
|
|
IOBase = None
|
|
SYSTEM = ' Linux '
|
|
PY_VERSION = 2
|
|
numpy_norm_axis = True
|
|
inspect_getfullargspec = False
|
|
__package__ = ' lib '
|
Imports:
bz2,
BZ2File,
gzip,
io,
itertools,
os,
platform,
sys,
threading,
builtins,
queue,
Queue3,
Queue2,
StringIO,
TextTestResult,
pickle,
numpy,
linux_distribution,
getargspec,
Queue,
unicode_escape_decode,
unicode
Abstract the numerous ways BZ2 files are handled in Python.
- Parameters:
file (str) - The file path to open.
mode (str) - The mode to open the file with. Only the values of 'r' and 'w'
for reading and writing respectively are supported.
- Returns: file object
- The bzip2 file object.
|
Abstract the numerous ways gzipped files are handled in Python.
- Parameters:
file (str) - The file path to open.
mode (str) - The mode to open the file with. Only the values of 'r' and 'w'
for reading and writing respectively are supported.
- Returns: file object
- The gzipped file object.
|
Implementation of the itertools.chain.from_iterable() function for all
Python versions.
- Parameters:
items (list) - The normal argument for itertools.chain.from_iterable().
- Returns: unknown
- The items of the list.
|
Replacement itertools.chain.from_iterable() function for Python <
2.6.
- Parameters:
items (list) - The normal argument for itertools.chain.from_iterable().
- Returns: unknown
- The elements
|
Replacement numpy.linalg.norm() function to handle the axis argument
for old numpy.
- Parameters:
x (array_like) - Input array. If `axis` is None, `x` must be 1-D or 2-D.
ord ({non-zero int, inf, -inf, 'fro'}, optional) - Order of the norm (see table under ``Notes``). inf means numpy's
`inf` object.
axis ({int, 2-tuple of ints, None}, optional) - If `axis` is an integer, it specifies the axis of `x` along which
to compute the vector norms. If `axis` is a 2-tuple, it
specifies the axes that hold 2-D matrices, and the matrix norms
of these matrices are computed. If `axis` is None then either a
vector norm (when `x` is 1-D) or a matrix norm (when `x` is 2-D)
is returned.
|
Create a unicode string for Python 2.
- Parameters:
text (str) - The text to convert.
- Returns: unicode
- The text converted to unicode.
|