def open(self, output):
if isinstance(output, types.Listype):<EOL><INDENT>self.output = output<EOL><DEDENT>else:<EOL><INDENT>raise IOError("<STR_LIT>" % (type(output),<EOL>output))<EOL><DEDENT>return<EOL>
Use this to set where to write to. output can be a
        file object or a string. This code raises IOError on error.

        If another file was previously open upon calling this open,
        that will be stacked and will come back into use after
        a close_write().