(module, number)
Stop a specific session; calls the respective module's
         shutdown() method.
        @param module is the module number
        @param number is the session number
Stop a specific session; calls the respective module's
         shutdown() method.
Stop a specific session ; calls the respective module s shutdown () method .
def stop_session(module, number):
    """ Stop a specific session; calls the respective module's
         shutdown() method.
        @param module is the module number
        @param number is the session number
    """
    global HOUSE

    if module == 'all' and number == -1:
        # kill all
        for key in HOUSE.keys():
            for entry in HOUSE[key]:
                HOUSE[key][entry].shutdown()
    else:
        (mod, mod_inst) = get_mod_num(module, number)
        if not mod is None and not mod_inst is None:
            HOUSE[mod][mod_inst].shutdown()
            del(HOUSE[mod][mod_inst])
            if len(HOUSE[mod].keys()) is 0:
                del(HOUSE[mod])
        else:
            return
    gc.collect()
def stop_session ( module , number ) : global HOUSE if module == 'all' and number == - 1 : # kill all for key in HOUSE . keys ( ) : for entry in HOUSE [ key ] : HOUSE [ key ] [ entry ] . shutdown ( ) else : ( mod , mod_inst ) = get_mod_num ( module , number ) if not mod is None and not mod_inst is None : HOUSE [ mod ] [ mod_inst ] . shutdown ( ) del ( HOUSE [ mod ] [ mod_inst ] ) if len ( HOUSE [ mod ] . keys ( ) ) is 0 : del ( HOUSE [ mod ] ) else : return gc . collect ( )