OK, so heres what I'm trying to do:
class MyClass(object): #Class I want to access
"""MyClass, base class for my class"""
def __init__(self, numberOfApples):
numberOfApples = 12 #Attribute I plan to use
myClassString = "MyClass"
#What I'm trying to do:
if myClassString.numberOfApples >= 12: """myClassString is in place of the real class name, MyClass"""
print "Wow, you got alot of apples!"
And what I'm trying to do is seeing if it is possible to reference an attribute of a class by using a string in place of the actual class name. Is this possible? If not, what's the closest thing I can get? Thanks.