Detect Linux Runlevel

Tim Chase python.list at
Tue Dec 6 14:06:35 EST 2016

On 2016-12-06 12:10, Wildman via Python-list wrote:
> If I had tried this in the beginning, it would have
> save you a lot of work.
> Since both versions of the code works, which one do
> you recommend?  Or does it matter?

Heh, I'm not sure it matters much.  The code I provided should be
expandable for tidily handling other entries in utmp, allowing you to
search for other system events that might interest you (check out the
invocation of the filter() function which filters by type).

Since I've already done the leg-work, I mildly advocate using my
version since it should be pretty clean and easy to expand.  But if
you want the satisfaction of using your code, I won't take offense :-)


More information about the Python-list mailing list