taking the example from here: <a href="http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/version/Doc/extension_types.html#CMethods">http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/version/Doc/extension_types.html#CMethods
</a><br><br>parrot.pyx<br>====================<br><tt>cdef class Parrot:<br>
<br>
cdef void describe(self):<br>
print "This parrot is resting."<br>
<br>
cdef class Norwegian(Parrot):<br>
<br>
cdef void describe(self):<br>
Parrot.describe(self)<br>
print "Lovely plumage!"<br>
<br>
<br>
cdef Parrot p1, p2<br>
p1 = Parrot()<br>
p2 = Norwegian()<br>
print "p1:"<br>
p1.describe()<br>
print "p2:"<br>
p2.describe()</tt> <br>====================<br><br>I created a shared lib named parrot.so and then tried to import it<br><br>Python 2.4.3 (#1, May 31 2006, 15:15:15)<br>[GCC 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1,
ssp-3.3.5.20050130-1, pie-8.7.7. on linux2<br>Type "help", "copyright", "credits" or "license" for more information.<br>>>> import parrot<br>p1:<br>This parrot is resting.<br>
p2:<br>This parrot is resting.<br>Lovely plumage!<br>>>> dir(parrot)<br>['Norwegian', 'Parrot', '__builtins__', '__doc__', '__file__', '__name__']<br>>>> p=parrot.Parrot()<br>>>> dir(p)<br>['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__pyx_vtable__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__']
<br>>>> dir(p.__pyx_vtable__)<br>[]<br>>>> p.decribe()<br>Traceback (most recent call last):<br> File "<stdin>", line 1, in ?<br>AttributeError: 'parrot.Parrot' object has no attribute 'decribe'
<br>>>> <br><br><br>Now the problem is when i say dir(p)<br> i donot see the describe method, nor am i able to call it.<br>Is it not possible to create an instance of cdef'ed class?<br><br>any clues?<br>
<br>thanks in adavnce<br><br>TD<br>