def stop_session(module, number):
 global HOUSE
 if ((module == 'all') and (number == (-1))):
  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 ) ) ) : 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 ( )
stop a specific session; calls the respective modules shutdown() method .