common.setup#
Various methods used to initialize Bookmarks, mainly, initialize()
and
uninitialize()
.
Functions:
|
Initializes the components required to run Bookmarks. |
Un-initializes all app components. |
|
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, useStandaloneMode
.1from bookmarks import common 2 3common.initialize(common.StandaloneMode) 4common.main_widget.show() 5common.uninitialize()
- Parameters:
mode (str) – The initialization mode. One of
StandaloneMode
orEmbeddedMode
.