python 3.x - Root access in Python3 -


i want write simple program manage screen brightness on laptop, running python3 under ubuntu linux.

to directly change screen brightness levels, can deal single file in folder /sys/class/backlight/acpi_video0, called brightness.
(the maximum brightness text file called max_brightness, it's easy find)

the problem is, however, want grant program partial access root permissions, enough modify files in folder (though, i'd flexible enough choose folder in /sys/class/backlight/, in case it's not named acpi_video0), not run root, may cause problems tries access gtk graphical interface.

how grant python3 program partial root permissions?

don't need launch program sudo (root not recommended), not sure can run partial code root.

alternately split program , messaging schema between them


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -