user1275011
user1275011

Reputation: 1772

IronPython getting function name at runtime

this code:

inspect.getsource(F)

will return F() sourcecode as string.

How can I retrieve just the name?

Thanks!

Upvotes: 0

Views: 180

Answers (1)

Jeff Hardy
Jeff Hardy

Reputation: 7662

Fairly simple:

print F.__name__

Upvotes: 1

Related Questions