Name

xpt.acc_string2boolean — argument check and convert string to boolean

Synopsis

import xpt
xpt.acc_string2boolean(ARG, default=False)

Description

Check and convert ARG to a boolean value. ARG is assumed to be a string passed to a XPT registered Python function. Note that passing a boolean value via ARG just returns it's value. Is ARG is None, the default value is returned. Valid string values for True are "yes", "true" and "1". All other valuesa are assumed False.

Return value

A boolean value.

Errors

An exception is raised if incorrect parameters are passed.

See Also

xpt(1), python(1), xpt.acc_string2integer().