subclassing socket._socket
Péter Szabó <[email protected]> Sun, 31 Jan 2010 14:57:42 +0100
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
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=E9ter