def write_dictionary(dictionary, args):
    output_format = args.output_format
    if output_format == "bookeen":
        # NOTE
        # for bookeen format we cannot add the file extension
        # as for the other formats, since we might have to generate
        # a compressed .install file or an uncompressed pair (.dict.idx and .dict)
        # this is dealt with directly in format_bookeen.py
        import penelope.format_bookeen
        return penelope.format_bookeen.write(dictionary, args, args.output_file)
    elif output_format == "csv":
        output_file_path = add_extension(args.output_file, ".csv")
        import penelope.format_csv
        return penelope.format_csv.write(dictionary, args, output_file_path)
    elif output_format == "epub":
        output_file_path = add_extension(args.output_file, ".epub")
        import penelope.format_epub
        return penelope.format_epub.write(dictionary, args, output_file_path)
    elif output_format == "kobo":
        output_file_path = get_kobo_file_path(args)
        import penelope.format_kobo
        return penelope.format_kobo.write(dictionary, args, output_file_path)
    elif output_format == "mobi":
        output_file_path = add_extension(args.output_file, ".mobi")
        import penelope.format_mobi
        return penelope.format_mobi.write(dictionary, args, output_file_path)
    elif output_format == "stardict":
        output_file_path = add_extension(args.output_file, ".zip")
        import penelope.format_stardict
        return penelope.format_stardict.write(dictionary, args, output_file_path)
    elif output_format == "xml":
        output_file_path = add_extension(args.output_file, ".xml")
        import penelope.format_xml
        return penelope.format_xml.write(dictionary, args, output_file_path)
    return False
Executes the given SQL statement, with optional parameters.
dataset/ETHPy150Open pettarin/penelope/penelope/dictionary.py/write_dictionary--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/South-1.0.2/south/db/generic.py/DatabaseOperations.execute