The following will return a dictionary containing the names and
functions of all the public functions in the current module. If a
function starts with an underscore _, it is considered private and not
listed.

def _ListFunctions():
    import sys
    import types
    d = {}
    module = sys.modules[__name__]
    for key, value in module.__dict__.items():
        if type(value) is types.FunctionType:
            fnname = value.__name__
            if fnname[0] != '_':
                d[value.__name__] = value
    return d

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to