menu/lcdmenu.py
def probe_system_service(name):
    """Query for systemctl for service _name_, returning a map of state
    information. The returned map has the keys:
    * LoadState
    * ActiveState
    * SubState
    :param name: The name of the service to query
    :type name: basestring
    :return: A map"""
    all_states = [LOAD_STATE, ACTIVE_STATE, SUB_STATE]
    states = "".join(["-p " + p + " " for p in all_states])
    s = popen("systemctl show " + states + name).read().strip()
    if not s:
        return {}
    ll = [i.split("=") for i in s.split("\n")]
    properties = {i[0]: i[1] for i in ll}
    return properties
Query for systemctl for service _name_, returning a map of state
    information. The returned map has the keys:
    * LoadState
    * ActiveState
    * SubState
    :param name: The name of the service to query
    :type name: basestring
    :return: A map
Query for systemctl for service _name_, returning a map of state
information.
Query for systemctl for service _name_ returning a map of state information .
def probe_system_service(name):
    all_states = [LOAD_STATE, ACTIVE_STATE, SUB_STATE]
    states = "".join(["-p " + p + " " for p in all_states])
    s = popen("systemctl show " + states + name).read().strip()
    if not s:
        return {}
    ll = [i.split("=") for i in s.split("\n")]
    properties = {i[0]: i[1] for i in ll}
    return properties
def probe_system_service ( name ) : all_states = [ LOAD_STATE , ACTIVE_STATE , SUB_STATE ] states = "" . join ( [ "-p " + p + " " for p in all_states ] ) s = popen ( "systemctl show " + states + name ) . read ( ) . strip ( ) if not s : return { } ll = [ i . split ( "=" ) for i in s . split ( "\n" ) ] properties = { i [ 0 ] : i [ 1 ] for i in ll } return properties
Query for systemctl for service _name_, returning a map of state
information.
Query for systemctl for service _name_ returning a map of state information .
"""Query for systemctl for service _name_, returning a map of state
    information. The returned map has the keys:
    * LoadState
    * ActiveState
    * SubState
    :param name: The name of the service to query
    :type name: basestring
    :return: A map"""
None
name
The name of the service to query
The name of the service to query