Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: fetching method names from a class,and the parameter list from a method

Thread Tools

Re: fetching method names from a class,and the parameter list from a method

John Lenton
Posts: n/a
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)


John Lenton ((E-Mail Removed)) -- Random fortune:
In Greene, New York, it is illegal to eat peanuts and walk backwards on
the sidewalks when a concert is on.

Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFB42A5gPqu395ykGsRAtDcAKC4vwU2GnnHnnweqe69So 8blS2woQCeJ5c5

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing file names with '.' in their names from list? Sfdesigner Sfdesigner Ruby 5 08-13-2007 02:38 AM
Parameter List / Parameter Block / Anything patterns... C++ 4 03-29-2007 09:37 PM
Get formal parameter names of a method? Jeff Cohen Ruby 6 08-15-2006 12:24 AM
Stopping the cpan shell from fetching the modules list Mumia W. Perl Misc 1 08-10-2006 09:25 AM
fetching method names from a class, and the parameter list from amethod Philippe C. Martin Python 0 01-10-2005 07:29 PM