On Sun, Jul 26, 2009 at 10:19 AM, Michael
Foord<[email protected]> wrote:
>
> You can always use the inspect module. (getargspec function.)

Too bad it's such a pain to use from C# (dynamic, please!) - but it
can't be any worse that trying to parse the signature. I'll probably
give both a try and see which one works out better.

- Jeff


>
> Michael
>
>> - Jeff
>>
>> On Fri, Jul 24, 2009 at 6:04 PM, Dino Viehland<[email protected]> 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: [email protected] [mailto:users-
>>>> [email protected]] 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
>>>> [email protected]
>>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [email protected]
>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>>
>>>
>>
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>
>
>
> --
> http://www.ironpythoninaction.com/
> http://www.voidspace.org.uk/blog
>
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to