title: Creating a stream class in Python
body: <p>I have a class which expects a stream that contains an XML file.<br>
  I don't necessarily want a file stream and I might want to use other sources like a database, a socket etc.<br>
  What class do I need to subclass from the <a href="http://docs.python.org/library/io.html" rel="noreferrer">io module</a> in order to supply the stream interface from other sources?</p>