WebKit.ImportSpy
index
/usr/local/share/webware/WebKit/ImportSpy.py

 
Modules
       
ihooks
imp
os
sys

 
Classes
       
ImportLock
ihooks.ModuleLoader(ihooks.BasicModuleLoader)
ModuleLoader

 
class ImportLock
    Lock for multi-threaded imports.
 
Provides a lock for protecting against concurrent imports. This is
necessary because WebKit is multithreaded and uses its own import hook.
 
This class abstracts the difference between using the Python interpreter's
global import lock, and using our own RLock. The global lock is the correct
solution, but is only available in Python since version 2.2.3. If it's not
available, we fall back to using an RLock (which is not as good, but better
than nothing).
 
  Methods defined here:
__init__(self)
Create the lock.
 
Aliases the `acquire` and `release` methods to
`imp.acquire_lock` and `imp.release_lock` (if available),
or to acquire and release our own RLock.

 
class ModuleLoader(ihooks.ModuleLoader)
    The import hook.
 
Implements the ihook module loader that tracks imported modules.
 
 
Method resolution order:
ModuleLoader
ihooks.ModuleLoader
ihooks.BasicModuleLoader
ihooks._Verbose

Methods defined here:
__init__(self)
Create import hook.
activate(self)
Activate the ModuleLoader.
delModules(self, includePythonModules=False, excludePrefixes=[])
Delete imported modules.
 
Deletes all the modules that the ImportSpy has ever imported unless
they are part of WebKit. This in support of DebugAppServer's useful
(yet imperfect) support for AutoReload.
fileList(self)
Return the list of tracked files.
load_module(self, name, stuff)
Replaces imp.load_module().
notifyOfNewFiles(self, hook)
Register notification hook.
 
Called by someone else to register that they'd like to be know
when a new file is imported.
recordFileName(self, stuff, mod, isfile=<function isfile>)
Record a file.
recordModules(self, moduleNames)
Record a list of modules.
watchFile(self, filepath, getmtime=<function getmtime>)
Add more files to watch without importing them.

Methods inherited from ihooks.ModuleLoader:
default_path(self)
find_builtin_module(self, name)
find_module_in_dir(self, name, dir, allow_packages=1)
get_hooks(self)
modules_dict(self)
set_hooks(self, hooks)

Methods inherited from ihooks.BasicModuleLoader:
find_module(self, name, path=None)

Methods inherited from ihooks._Verbose:
get_verbose(self)
message(self, format, *args)
note(self, *args)
set_verbose(self, verbose)

 
Functions
       
find_module(name, path=None)
See ModuleLoader.find_module.
load_module(name, file, filename, description)
See ModuleLoader.load_module.
reset()
watchFile(*args)
See ModuleLoader.watchFile.

 
Data
        modloader = <WebKit.ImportSpy.ModuleLoader instance>