Package logilab-common-0 :: Package 39 :: Package 0 :: Module compat
[frames] | no frames]

Module compat

source code

Wrappers around some builtins introduced in python 2.3, 2.4 and
2.5, making them available in for earlier versions of python.

:copyright: 2000-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: General Public License version 2 - http://www.gnu.org/licenses

Classes
  frozenset
immutable set (can be set in dictionnaries)
  set
mutable set
  CalledProcessError
This exception is raised when a process run by check_call() returns a non-zero exit status.
Functions
 
izip(*iterables) source code
 
chain(*iterables) source code
 
imap(function, *iterables) source code
 
sum(seq, start=0)
Returns the sum of all elements in the sequence
source code
 
enumerate(iterable)
emulates the python2.3 enumerate() function
source code
 
sorted(iterable, cmp=None, key=None, reverse=False) source code
 
reversed(l) source code
 
max(*args, **kargs) source code
bool

any(iterable)
Return True if bool(x) is True for any x in the iterable.
source code
bool

all(iterable)
Return True if bool(x) is True for all values x in the iterable.
source code
 
call(*popenargs, **kwargs)
Run command with arguments.
source code
 
check_call(*popenargs, **kwargs)
Run command with arguments.
source code
Variables
  Set = class_renamed('Set', set, 'logilab.common.compat.Set is ...
Function Details

call(*popenargs, **kwargs)

source code 
Run command with arguments.  Wait for command to complete, then
return the returncode attribute.

The arguments are the same as for the Popen constructor.  Example:

retcode = call(["ls", "-l"])

check_call(*popenargs, **kwargs)

source code 
Run command with arguments.  Wait for command to complete.  If
the exit code was zero then return, otherwise raise
CalledProcessError.  The CalledProcessError object will have the
return code in the returncode attribute.

The arguments are the same as for the Popen constructor.  Example:

check_call(["ls", "-l"])


Variables Details

Set

Value:
class_renamed('Set', set, 'logilab.common.compat.Set is deprecated, ' \
'use logilab.common.compat.set instead')