Python : Get all Ints from inside Class Instance : I want to get all int types of a unknown class instance

If I have the following class

    class myclass:
    g_goodies = 0
    g_stringer = "bob"
    mylist = []
    
    def __init__(self,goodies):
    self.g_goodies = goodies
    for x in range(0,10):
    self.mylist.append(0)

And I have tried .. 

    def get_ints(self,inobject):
    a = inspect.getmembers(inobject)
    b = len(a)
    print 'a:',a,' b:',b
    print 'a type:',type(a),' b type:',type(b)
    for x in range(0,b-1):
    c = type(a[x])
    print c

    print "Hello World!\n"
    mc = myclass(10)
    pa = printanything()
    print pa.get_ints(mc)

which gives me. 

    $python main.py
    Hello World!

    a: [('__doc__', None), ('__init__', <bound method myclass.__init__ of <__main__.myclass instance at 0x7f34ee9e80e0>>), ('__module__', '__main__'), ('g_goodies', 10), ('g_stringer', 'bob'), ('mylist', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])]  b: 6
    a type: <type 'list'>  b type: <type 'int'>
    <type 'tuple'>
    <type 'tuple'>
    <type 'tuple'>
    <type 'tuple'>
    <type 'tuple'>
    None

So I simply want to be able to extract all the type <ints> in a class instance, all the type <string> in a class object etc..  The class is not known at run time.


