Module appModuleHandler
[hide private]
[frames] | no frames]

Module appModuleHandler

source code

Manages appModules.

Classes [hide private]
  processEntry32W
  AppModule
Base app module.
Functions [hide private]
unicode or str
getAppNameFromProcessID(processID, includeExt=False)
Finds out the application name of the given process.
source code
 
getAppModuleForNVDAObject(obj) source code
appModule
getAppModuleFromProcessID(processID)
Finds the appModule that is for the given process ID.
source code
 
update(processID)
Removes any appModules from the cache whose process has died, and also tries to load a new appModule for the given process ID if need be.
source code
 
doesAppModuleExist(name) source code
AppModule
fetchAppModule(processID, appName)
Returns an appModule found in the appModules directory, for the given application name.
source code
 
reloadAppModules()
Reloads running appModules.
source code
 
initialize()
Initializes the appModule subsystem.
source code
 
terminate() source code
Variables [hide private]
dict runningTable = {}
a dictionary of the currently running appModules, using their application's main window handle as a key.
  NVDAProcessID = None
hash(x)
  _importers = None
hash(x)
Function Details [hide private]

getAppNameFromProcessID(processID, includeExt=False)

source code 

Finds out the application name of the given process.

Parameters:
  • processID (int) - the ID of the process handle of the application you wish to get the name of.
  • includeExt - True to include the extension of the application's executable filename, False to exclude it.
  • window (bool)
Returns: unicode or str
application name

getAppModuleFromProcessID(processID)

source code 

Finds the appModule that is for the given process ID. The module is also cached for later retreavals.

Parameters:
  • processID (int) - The ID of the process for which you wish to find the appModule.
Returns: appModule
the appModule, or None if there isn't one

update(processID)

source code 

Removes any appModules from the cache whose process has died, and also tries to load a new appModule for the given process ID if need be.

Parameters:
  • processID (int) - the ID of the process.

fetchAppModule(processID, appName)

source code 

Returns an appModule found in the appModules directory, for the given application name.

Parameters:
  • processID (integer) - process ID for it to be associated with
  • appName (unicode or str) - the application name for which an appModule should be found.
Returns: AppModule
the appModule, or None if not found

reloadAppModules()

source code 

Reloads running appModules. especially, it clears the cache of running appModules and deletes them from sys.modules. Each appModule will be reloaded immediately as a reaction on a first event coming from the process.