Python 2.7 File Socket Shims

1.0 Documentation

«  XML Serialization   ::   Contents   ::   Glossary  »

Python 2.7 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.7 when using sockets as file objects.

The parser for ElementTree 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.

«  XML Serialization   ::   Contents   ::   Glossary  »

From &yet