.. This file is autogenerated. Do not edit. It will be overwritten. Edit the file in the examples directory and generate the docs again.

WriteFile
==========================

.. code:: python

    import desktop_entry_lib
    
    
    def main() -> None:
        entry = desktop_entry_lib.DesktopEntry()
    
        entry.Name.default_text = "My App"
        entry.Comment.default_text = "A short description"
        entry.Comment.translations["de"] = "A short german description"
        entry.Type = "Application"
        entry.Exec = "my-app"
    
        entry.write_file("my_app.desktop")
    
    
    if __name__ == "__main__":
        main()


:repolink:`View this example on Codeberg <examples/WriteFile.py>`