Convert string to Python class object?
<p>Given a string as user input to a python function, I'd like to get a class object out of it if there's a class with that name in the currently defined namespace. Essentially, I want the implementation for a function which will produce this kind of result:</p>

<pre><code>class Foo:
    pass

str_to_class("Foo")
==&gt; &lt;class __main__.Foo at 0x69ba0&gt;
</code></pre>

<p>Is this possible?</p>
