Skip to content

ngdb.types

Defines helpful types and values for the library..

EntryType

Bases: Enum

Types of entry in a guide.

LONG class-attribute instance-attribute

LONG = 1

The record ID for a long entry in a Norton Guide database.

MENU class-attribute instance-attribute

MENU = 2

The record ID for a menu in a Norton Guide database.

SHORT class-attribute instance-attribute

SHORT = 0

The record ID for a short entry in a Norton Guide database.

is_long classmethod

is_long(test)

Is the value the ID of a long entry?

Parameters:

Name Type Description Default

test

int

The value to test.

required

Returns:

Type Description
bool

True if it is a long, False if not.

is_menu classmethod

is_menu(test)

Is the value the ID of a menu?

Parameters:

Name Type Description Default

test

int

The value to test.

required

Returns:

Type Description
bool

True if it is a menu, False if not.

is_short classmethod

is_short(test)

Is the value the ID of a short entry?

Parameters:

Name Type Description Default

test

int

The value to test.

required

Returns:

Type Description
bool

True if it is a short, False if not.

NGDBError

Bases: Exception

Base exception of all exceptions in the library.

NGEOF

Bases: NGDBError

Type of an exception thrown when doing things at or past EOF.

UnknownEntryType

Bases: NGDBError

Type of an exception when faced with an unknown entry type.