common.setup#

Various methods used to initialize Bookmarks, mainly, initialize() and uninitialize().

Functions:

initialize(mode)

Initializes the components required to run Bookmarks.

uninitialize()

Un-initializes all app components.

verify_dependencies()

Checks the presence of all required python modules.

bookmarks.common.setup.initialize(mode)[source]#

Initializes the components required to run Bookmarks.

It is important to call this function before running the app as it is responsible for loading the resource variables and starting the helper threads item models use to load information.

Note

Don’t forget to call uninitialize() before terminating the application, to gracefully stop threads and remove previously initialized components from the memory.

When Bookmarks is used inside a compatible DCC, the mode should be EmbeddedMode. When running as a standalone application, use StandaloneMode.

1from bookmarks import common
2
3common.initialize(common.StandaloneMode)
4common.main_widget.show()
5common.uninitialize()
Parameters

mode (str) – The initialization mode. One of StandaloneMode or EmbeddedMode.

bookmarks.common.setup.uninitialize()[source]#

Un-initializes all app components.

bookmarks.common.setup.verify_dependencies()[source]#

Checks the presence of all required python modules.

Raises

ModuleNotFoundError – When a required python library was not found.