NVDAState module

class NVDAState._WritePaths

Bases: object

property configDir: str
property addonsDir: str
property addonStoreDir: str
property addonStoreDownloadDir: str
property profilesDir: str
property scratchpadDir: str
property speechDictsDir: str
property voiceDictsDir: str
property voiceDictsBackupDir: str
property updatesDir: str
property nvdaConfigFile: str
property addonStateFile: str
property profileTriggersFile: str
property gesturesConfigFile: str
property speechDictDefaultFile: str
property updateCheckStateFile: str
getSymbolsConfigFile(locale: str) str
getProfileConfigFile(name: str) str
NVDAState.isRunningAsSource() bool

True if NVDA is running as a source copy. When running as an installed copy, py2exe sets sys.frozen to ‘windows_exe’.

NVDAState._allowDeprecatedAPI() bool

Used for marking code as deprecated. This should never be False in released code.

Making this False may be useful for testing if code is compliant without using deprecated APIs. Note that deprecated code may be imported at runtime, and as such, this value cannot be changed at runtime to test compliance.

NVDAState.getStartTime() float
NVDAState._initializeStartTime() None
NVDAState._getExitCode() int
NVDAState._setExitCode(exitCode: int) None
NVDAState.shouldWriteToDisk() bool

Never save config or state if running securely or if running from the launcher. When running from the launcher we don’t save settings because the user may decide not to install this version, and these settings may not be compatible with the already installed version. See #7688

class NVDAState._TrackNVDAInitialization

Bases: object

During NVDA initialization, core._initializeObjectCaches needs to cache the desktop object, regardless of lock state. Security checks may cause the desktop object to not be set if NVDA starts on the lock screen. As such, during initialization, NVDA should behave as if Windows is unlocked, i.e. winAPI.sessionTracking.isLockScreenModeActive should return False.

_isNVDAInitialized = False

When False, isLockScreenModeActive is forced to return False.

static markInitializationComplete()
static isInitializationComplete() bool
NVDAState._forceSecureModeEnabled() bool
NVDAState._serviceDebugEnabled() bool
NVDAState._configInLocalAppDataEnabled() bool