module functions list

Diez B. Roggisch deetsNOSPAM at web.de
Wed Aug 25 08:45:38 EDT 2004


Hi,

> You could use a list comprehension coupled with a filter:
> 
> functionList = [function for function in dir(objectName) \
>     if callable(getattr(objectName,function))]

That works if objectName is my module - but how do I get a reference to the
current module _inside_ my module? Thats the hart part (at least for
me ...)

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list