Retrieving a method by using string of method's name? Python
<p>I'm wondering if it's possible in Python to find a method in a different function by using it's string name.</p>

<p>In one function, I pass in a method:</p>

<pre><code>def register(methods):
    for m in methods:
        messageType = m.__name__
        python_client_socket.send(messageType)


register(Foo)
</code></pre>

<p>In a different method that takes in the string that was sent over, I want to be able to associate a number with the method in a dictionary ( i.e. <code>methodDict = {1: Foo, 2:Bar, etc...}</code> )</p>

<p>Is there a way in Python to find the method from the string?</p>
