Detect Linux Runlevel

Marko Rauhamaa marko at pacujo.net
Mon Dec 5 16:59:48 EST 2016


Wildman <best_lay at yahoo.com>:
> Thanks but I knew about systemctl. As I already said my goal is to do
> it without the use of an external program.

Inspect:

   <URL:
   https://github.com/systemd/systemd/blob/master/src/systemctl/systemctl.c>

In particular:

   get_state_one_unit()

Then, proceed to:

   <URL: https://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html>


Marko



More information about the Python-list mailing list