Kiwisolver Python API

kiwisolver extension module

exception kiwisolver.BadRequiredStrength

Bases: Exception

class kiwisolver.Constraint

Bases: object

expression()

Get the expression object for the constraint.

op()

Get the relational operator for the constraint.

strength()

Get the strength for the constraint.

exception kiwisolver.DuplicateConstraint

Bases: Exception

exception kiwisolver.DuplicateEditVariable

Bases: Exception

class kiwisolver.Expression

Bases: object

constant()

Get the constant for the expression.

terms()

Get the tuple of terms for the expression.

value()

Get the value for the expression.

class kiwisolver.Solver

Bases: object

addConstraint()

Add a constraint to the solver.

addEditVariable()

Add an edit variable to the solver.

dump()

Dump a representation of the solver internals to stdout.

dumps()

Dump a representation of the solver internals to a string.

hasConstraint()

Check whether the solver contains a constraint.

hasEditVariable()

Check whether the solver contains an edit variable.

removeConstraint()

Remove a constraint from the solver.

removeEditVariable()

Remove an edit variable from the solver.

reset()

Reset the solver to the initial empty starting condition.

suggestValue()

Suggest a desired value for an edit variable.

updateVariables()

Update the values of the solver variables.

class kiwisolver.Term

Bases: object

coefficient()

Get the coefficient for the term.

value()

Get the value for the term.

variable()

Get the variable for the term.

exception kiwisolver.UnknownConstraint

Bases: Exception

exception kiwisolver.UnknownEditVariable

Bases: Exception

exception kiwisolver.UnsatisfiableConstraint

Bases: Exception

class kiwisolver.Variable

Bases: object

context()

Get the context object associated with the variable.

name()

Get the name of the variable.

setContext()

Set the context object associated with the variable.

setName()

Set the name of the variable.

value()

Get the current value of the variable.