'Remove the writer for the current thread, if any'

def unregister(self):

    try:
        del self.writers[thread.get_ident()]
    except KeyError:
        pass
    if (len(self.writers) == 0):
        sys.stdout = self.origStdOut
        self.origStdOut = None
