[IronPython] Getting function argument names from hosting

Dino Viehland dinov at microsoft.com
Sun Jul 26 18:56:37 CEST 2009


Yeah, that thought occurred to me about 5 minutes after I sent it out :)

This API was really intended for displaying intellisense style help
but even there you probably want to have individual arg info so you
can display different help as you go from param to param.  We should
look at coming up w/ a better API here.

> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Jeff Hardy
> Sent: Sunday, July 26, 2009 9:18 AM
> To: Discussion of IronPython
> Subject: Re: [IronPython] Getting function argument names from hosting
>
> Thanks, Dino!
>
> It'd be nice if I didn't have to parse the signature, but that'll do
> for now.
>
> - Jeff
>
> On Fri, Jul 24, 2009 at 6:04 PM, Dino Viehland<dinov at microsoft.com>
> wrote:
> > ObjectOperations.GetCallSignatures:
> >
> > import clr
> > clr.AddReference('IronPython')
> > from IronPython.Hosting import Python
> > x = Python.CreateEngine()
> > def f(a, b, c): pass
> >
> > x.Operations.GetCallSignatures(f)
> >
> > prints:
> > Array[str](('f(a, b, c)'))
> >
> >
> >> -----Original Message-----
> >> From: users-bounces at lists.ironpython.com [mailto:users-
> >> bounces at lists.ironpython.com] On Behalf Of Jeff Hardy
> >> Sent: Friday, July 24, 2009 5:02 PM
> >> To: Discussion of IronPython
> >> Subject: [IronPython] Getting function argument names from hosting
> >>
> >> Hi all,
> >> >From the hosting side, is there a way to get the names of a
> function's
> >> arguments? The DLR equivalent of MethodInfo.GetParamters(),
> >> essentially, is what I'm looking for (or a way to get an actual
> >> MethodInfo would be nice as well).
> >>
> >> - Jeff
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.ironpython.com
> >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list