Fix Python – How to dynamically load a Python class

Given a string of a Python class, e.g. my_package.my_module.MyClass, what is the best possible way to load it?
In other words I am looking for a equivalent Class.forName() in Java, function in Python. It needs to work on Google App Engine.
Preferably this would be a function that accepts the FQN of the class as a string, and returns a reference to….

Fix Python – How to check whether a variable is a class or not?

I was wondering how to check whether a variable is a class (not an instance!) or not.
I’ve tried to use the function isinstance(object, class_or_type_or_tuple) to do this, but I don’t know what type would a class will have.
For example, in the following code
class Foo: pass
isinstance(Foo, **???**) # i want to make this return True.

I tried to ….

Fix Python – How can I get a list of all classes within current module in Python?

I’ve seen plenty of examples of people extracting all of the classes from a module, usually something like:
class Foo:

import inspect
import foo

for name, obj in inspect.getmembers(foo):
if inspect.isclass(obj):
print obj

But I can’t find out how to get all of the classes from the current module…..

Fix Python – How to list all functions in a module?

I have a Python module installed on my system and I’d like to be able to see what functions/classes/methods are available in it.
I want to call the help function on each one. In Ruby I can do something like ClassName.methods to get a list of all the methods available on that class. Is there something similar in Python?
e.g. something like:
from so….