title: Root access in Python3
body: <p>I want to write a simple program to manage the screen brightness on my laptop, running Python3 under Ubuntu Linux.</p>
  
  <p>To directly change the screen brightness levels, I can deal with a single file in the folder <code>/sys/class/backlight/acpi_video0</code>, called <code>brightness</code>.<br>
  (the maximum brightness is another text file called <code>max_brightness</code>, so it's easy to find)</p>
  
  <p>The problem is, however, that I want to grant my program partial access to root permissions, just enough to modify the files in that folder (though, I'd like it to be flexible enough to choose any folder in <code>/sys/class/backlight/</code>, in case it's not named <code>acpi_video0</code>), but not actually run as root, as that may cause problems as it tries to access GTK for a graphical interface.</p>
  
  <p>How do I grant a Python3 program partial root permissions?</p>