def make_desktop_entry(d):
assert d['<STR_LIT:path>'].endswith('<STR_LIT>')<EOL>d.setdefault('<STR_LIT>', '<STR_LIT>')<EOL>d.setdefault('<STR_LIT>', '<STR_LIT>')<EOL>if isinstance(d['<STR_LIT>'], list):<EOL><INDENT>d['<STR_LIT>'] = '<STR_LIT:U+0020>'.join(d['<STR_LIT>'])<EOL><DEDENT>assert isinstance(d['<STR_LIT>'], bool)<EOL>d['<STR_LIT>'] = {False: '<STR_LIT:false>', True: '<STR_LIT:true>'}[d['<STR_LIT>']]<EOL>fo = open(d['<STR_LIT:path>'], "<STR_LIT:w>")<EOL>fo.write(
Create a desktop entry that conforms to the format of the Desktop Entry
Specification by freedesktop.org.  See:
        http://freedesktop.org/Standards/desktop-entry-spec
These should work for both KDE and Gnome2

An entry is a .desktop file that includes the application's type,
executable, name, etc.   It will be placed in the location specified within
the passed dict.