(self, source)
return stream
Produces a file object from source.

        source can be either a file object, local filename or a string.
Produces a file object from source.
Produces a file object from source .
def openStream(self, source):
        """Produces a file object from source.

        source can be either a file object, local filename or a string.

        """
        # Already a file object
        if hasattr(source, 'read'):
            stream = source
        else:
            stream = StringIO(source)

        return stream
def openStream ( self , source ) : # Already a file object if hasattr ( source , 'read' ) : stream = source else : stream = StringIO ( source ) return stream