Python 2.6 File Socket Shims

1.0 Documentation

«  XML Serialization   ::   Contents   ::   Glossary  »

Python 2.6 File Socket Shims

class sleekxmpp.xmlstream.filesocket.FileSocket(sock, mode='rb', bufsize=-1, close=False)[source]

Create a file object wrapper for a socket to work around issues present in Python 2.6 when using sockets as file objects.

The parser for cElementTree requires a file, but we will be reading from the XMPP connection socket instead.

read(size=4096)[source]

Read data from the socket as if it were a file.

class sleekxmpp.xmlstream.filesocket.Socket26(family=2, type=1, proto=0, _sock=None)[source]

A custom socket implementation that uses our own FileSocket class to work around issues in Python 2.6 when using sockets as files.

makefile([mode[, bufsize]]) → file object[source]

Return a regular file object corresponding to the socket. The mode and bufsize arguments are as for the built-in open() function.

«  XML Serialization   ::   Contents   ::   Glossary  »

From &yet