'write to file'

def write(self):

    if (not self.filename):
        raise YeditException('Please    specify    a    filename.')
    if (self.backup and self.file_exists()):
        shutil.copy(self.filename, (self.filename + '.orig'))
    try:
        self.yaml_dict.fa.set_block_style()
    except AttributeError:
        pass
    try:
        Yedit._write(self.filename, yaml.dump(self.yaml_dict, Dumper=yaml.RoundTripDumper))
    except AttributeError:
        Yedit._write(self.filename, yaml.safe_dump(self.yaml_dict, default_flow_style=False))
    return (True, self.yaml_dict)
