eric7.Utilities.ClassBrowsers.__init__

Package implementing class browsers for various languages.

Currently it offers class browser support for the following programming languages.

Global Attributes

IDL_SOURCE
JS_SOURCE
PROTO_SOURCE
PTL_SOURCE
PY_SOURCE
RB_SOURCE
SUPPORTED_TYPES
UNKNOWN_SOURCE
__extensions

Classes

None

Functions

find_module Function to extend the Python module finding mechanism.
getClassBrowserModule Function to import a class browser module.
readmodule Function to read a source file and return a dictionary of classes, functions, modules, etc.


find_module

find_module(name, path, isPyFile=False)

Function to extend the Python module finding mechanism.

This function searches for files in the given list of paths. If the file name doesn't have an extension or an extension of .py, the normal Python search implemented in the imp module is used. For all other supported files only the paths list is searched.

name (str)
file name or module name to search for
path (list of str)
search paths
isPyFile (bool)
flag indicating a Python file
Return:
tuple of the open file, pathname and description. Description is a tuple of file suffix, file mode and file type)
Return Type:
tuple
Raises ImportError:
The file or module wasn't found.
Up


getClassBrowserModule

getClassBrowserModule(moduleType)

Function to import a class browser module.

moduleType (str)
type of class browser to load
Return:
reference to the imported class browser module
Return Type:
module
Up


readmodule

readmodule(module, path=None, isPyFile=False)

Function to read a source file and return a dictionary of classes, functions, modules, etc. .

The real work of parsing the source file is delegated to the individual file parsers.

module (str)
name of the source file
path (list of str)
list of paths the file should be searched in
isPyFile (bool)
flag indicating a Python file
Return:
the resulting dictionary
Return Type:
dict
Up