understand

Methods Summary

checksum

Return a checksum of the text

deregisterlicensecode

Deregister the current Understand license code.

license

Set a regcode string or a specific path to an understand license.

open

Open a database from the passed in filename.

setlicensecode

Set an Understand license code.

version

Return the current version (Major and Minor) and the build number for this module separated by '.'

Methods Documentation

understand.checksum(text, len=32) str

Return a checksum of the text

Parameters:
  • text (str) – the text to checksum

  • len (int) – optional, the length of the checksum. This should be a value between 1 and 32, and defaults to 32.

Return type:

str

Returns:

the checksum

understand.deregisterlicensecode()

Deregister the current Understand license code.

Return type:

None

understand.license(name) None

Set a regcode string or a specific path to an understand license.

Parameters:

name (str) – the license code or path to an Understand license.

Return type:

None

understand.open(dbname) understand.Db

Open a database from the passed in filename.

Parameters:

dbname (str) – the filename of the database

Return type:

understand.Db

Returns:

An opened database

Raises:

Understand.Error – if unable to open the database

Possible causes for error are:

  • DBAlreadyOpen - only one database may be open at once

  • DBCorrupt - bad database file

  • DBOldVersion - database needs to be rebuilt

  • DBUnknownVersion - database needs to be rebuilt

  • DBUnableOpen - database is unreadable or does not exist

  • NoApiLicense - Understand license required

understand.setlicensecode(name) None

Set an Understand license code.

Parameters:

name (str) – the license code.

Return type:

None

understand.version() str

Return the current version (Major and Minor) and the build number for this module separated by ‘.’

Return type:

str

Returns:

the current version and build number