Finding Function Args?

Chris S. chrisks at NOSPAMudel.edu
Tue Jun 15 06:54:17 CEST 2004


Thanks for the help.

Mike C. Fletcher wrote:

> Check the standard module inspect, particularly;
> 
>  >>> import inspect
>  >>> import cgi
>  >>> inspect.getargspec( cgi.escape )
> (['s', 'quote'], None, None, (None,))
> 
> 
> HTH,
> Mike
> 
> Chris S. wrote:
> 
>> Is there a way to dynamically find out how many arguments a function 
>> requires? I thought this would be listed somewhere with dir() but I 
>> can't find anything. Any help is appreciated.
> 
> 
> ________________________________________________
>  Mike C. Fletcher
>  Designer, VR Plumber, Coder
>  http://members.rogers.com/mcfletch/
>  blog: http://zope.vex.net/~mcfletch/plumbing/
> 
> 



More information about the Python-list mailing list