File: test-desktop-write.py

package info (click to toggle)
pyxdg 0.8-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 172 kB
  • ctags: 266
  • sloc: python: 1,754; makefile: 2
file content (11 lines) | stat: -rwxr-xr-x 252 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env python2
from xdg.DesktopEntry import *

import os, sys

test = DesktopEntry()
test.parse("/usr/share/applications/gedit.desktop")
test.removeKey("Name")
test.addGroup("Hallo")
test.set("key", "value", "Hallo")
test.write("test.desktop")