def is_ac_online(supply_path):
        """
        @param supply_path: Path to power supply
        @return: True if ac is online. Otherwise False
        """
        with open(os.path.join(supply_path, 'online'), 'r') as online_file:
            return online_file.readline().strip() == '1'
def is_ac_online ( supply_path ) : with open ( os . path . join ( supply_path , 'online' ) , 'r' ) as online_file : return online_file . readline ( ) . strip ( ) == '1'
@param supply_path: Path to power supply
        @return: True if ac is online. Otherwise False