Python 如何从桌面文件获取Exec字段

Python 如何从桌面文件获取Exec字段,python,linux,python-2.7,gtk,gio,Python,Linux,Python 2.7,Gtk,Gio,如何从.desktop文件提取Exec字段。吉奥能帮我吗 #!/usr/bin/python2 import os from gi.repository import Gio launcher = Gio.DesktopAppInfo.new_from_filename('/usr/share/applications/chromium.desktop') # how get Exec field from desktop file # cat /usr/share/applications

如何从.desktop文件提取Exec字段。吉奥能帮我吗

#!/usr/bin/python2

import os
from gi.repository import Gio

launcher = Gio.DesktopAppInfo.new_from_filename('/usr/share/applications/chromium.desktop')
# how get Exec field from desktop file
# cat /usr/share/applications/chromium.desktop | grep ^Exec

#retval = launcher.launch_uris()
我完全是新手

print launcher.get_命令行