Module config :: Class ConfigOutputStream
[show private | hide private]
[frames | no frames]

Type ConfigOutputStream

object --+
         |
        ConfigOutputStream


An output stream which can write either ANSI files with default encoding or Unicode files with BOMs.

Handles UTF-8, UTF-16LE, UTF-16BE. Could handle UTF-32 if Python had built-in support.
Method Summary
  __init__(self, stream, encoding)
Initialize an instance.
  close(self)
  flush(self)
  write(self, data)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
Return repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Method Details

__init__(self, stream, encoding=None)
(Constructor)

Initialize an instance.
Parameters:
stream - The underlying stream to be written.
           (type=A stream (file-like object).)
encoding - The desired encoding.
           (type=str)
Overrides:
__builtin__.object.__init__

close(self)

flush(self)

write(self, data)