GOffice.Unit

Fields

None

Methods

class

define (symbol, dim, factor_to_SI)

class

get (id)

class

get_from_symbol (symbol)

convert (to, value)

get_id ()

get_symbol ()

Details

class GOffice.Unit
classmethod define(symbol, dim, factor_to_SI)
Parameters:
  • symbol (str) – symbol name for unit.

  • dim (str) – dimension measured by unit.

  • factor_to_SI (float) – factor to convert to SI unit.

Returns:

the named GOffice.Unit. If a GOffice.Unit of that name already exists, the existing is returned. Otherwise a new one is created.

Return type:

GOffice.Unit

classmethod get(id)
Parameters:

id (GOffice.UnitId) – GOffice.UnitId for unit to query

Returns:

the GOffice.Unit corresponding to id.

Return type:

GOffice.Unit or None

classmethod get_from_symbol(symbol)
Parameters:

symbol (str) –

Return type:

GOffice.Unit

convert(to, value)
Parameters:
Return type:

float

get_id()
Return type:

GOffice.UnitId

get_symbol()
Return type:

str