[Pyrex] subclassing socket._socket
Péter Szabó
ptspts+pyrex at gmail.com
Sun Jan 31 14:57:42 CET 2010
Hi,
I'm trying to subclass socket._socket in Pyrex, but I can't seem to
get ctypedefs and cimports right. How is it possible to do it? Is it a
good idea to do it, or using it as an object member would be easier?
from socket cimport _socket
cdef extern from "Modules/socketmodule.h":
ctypedef class _socket.socket [object PySocketSockObject]:
pass
cdef class evsocket(socket):
pass
t.pyx:1:0: Cannot find .pxd file for module 'socket'
t.pyx:1:20: Name '_socket' not declared in module 'socket'
Thanks,
Péter
More information about the Pyrex
mailing list