FAQ
This must be the dumbest question ever...

Solved.
On Apr 21, 1:05 pm, Guillermo wrote:
Hi there,

How can I turn a string into a callable object/function?

I have a = 'len', and I want to do: if callable(eval(a)): print
"callable", but that doesn't quite work the way I want. :)

Regards,

Guillermo

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedApr 21, '08 at 11:05a
activeApr 21, '08 at 11:57a
posts4
users3
websitepython.org

People

Translate

site design / logo © 2023 Grokbase