fetching method names from a class, and the parameter list from a method
John Lenton
john at grulic.org.ar
Tue Jan 11 00:12:26 EST 2005
On Mon, Jan 10, 2005 at 08:29:40PM +0100, Philippe C. Martin wrote:
> Is this possible ?
>
> I am trying to have auto-completion working in a shell I wrote but I
> currently have the method lists done by hand (ie; if I add/subtract a
> method from that class, then my auto-completion is out of date).
>
> Same issue with method parameters.
>
> I have parsed through many of the attributes (ex: I use method.__doc__)
> but have not yet found a way to achieve the above goal.
>
> Is there a way? something like the following would be great:
> 1) list = Class.__methods__
> 2) dict (because of default values: "param = None") =
> Class.__method__[0].__params__
>>> import inspect
>>> help(inspect)
HTH
--
John Lenton (john at grulic.org.ar) -- Random fortune:
In Greene, New York, it is illegal to eat peanuts and walk backwards on
the sidewalks when a concert is on.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20050111/b4f46f0f/attachment.sig>
More information about the Python-list
mailing list