Finding Function Args?
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,))
> 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
> blog: http://zope.vex.net/~mcfletch/plumbing/
More information about the Python-list