My python code is at: /usr/lib/hildon-desktop Location of my shortcut: /usr/share/applications/hildon-status-menu/ How do i edit a file as root inside python code? The file I want to change is class as "root" rw-r--r--
import os import stat os.chmod('/your/file', stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IROTH)