def __init__(self, stream, *args, **kwargs): StringIO.__init__(self, *args, **kwargs) self.__altstream__ = stream