'Initialize the Console object.
newbuffer=1 will allocate a new buffer so the old content will be restored
on exit.'

def __init__(self, newbuffer=0):

    self.serial = 0
    self.attr = System.Console.ForegroundColor
    self.saveattr = winattr[str(System.Console.ForegroundColor).lower()]
    self.savebg = System.Console.BackgroundColor
    log(('initial    attr=%s' % self.attr))
    log_sock(('%s' % self.saveattr))
