syt at gemini.logilab.fr
Wed Jan 2 13:55:24 CET 2002
On Wed, 02 Jan 2002 13:13:44 -0800, Giorgi Lekishvili <gleki at gol.ge> wrote:
>happy new year, first of all!!!
>My question is simple, yet I missed the right answer, although have lots
>of books on Python:(
>Suppose, one has a module, which defines some set of functions.
>How can one get the names of all these functions as list entries?
>of course, this will not work.
>What is to be done? Some special functions are to be written or, is
>there a built-in tool?
you can use the built-in "dir" function to do things like that.
The following code filters functions from the "dir" output:
for f in dir(myModule):
if callable(getattr(myModule, d)):
More information about the Python-list