:return: A list of MIDI output :class:`Ports`.
496450
def midi_outputs(self):
        
        return self.client.get_ports(is_midi=True, is_physical=True, is_output=True)
477332
def _load_output_data_port_models(self):
        """"""
        if not self.state_copy_initialized:
            return
        self.output_data_ports = []
        for output_data_port_m in self.state_copy.output_data_ports:
            new_op_m = deepcopy(output_data_port_m)
            new_op_m.parent = self
            new_op_m.data_port = output_data_port_m.data_port
            self.output_data_ports.append(new_op_m)
1112666
def sensor_names(self):
        
        res = self['/attr/instrument_name']
        if isinstance(res, np.ndarray):
            res = str(res.astype(str))
        res = [x.strip() for x in res.split(',')]
        if len(res) == 1:
            return res[0]
        return res
435870
def getInstruments(self):
        
        query = {"portal_type": "Instrument", "is_active": True}

        if self.getRestrictToMethod():
            query.update({
                "getMethodUIDs": {
                    "query": api.get_uid(self.getRestrictToMethod()),
                    "operator": "or",
                }
            })

        instruments = api.search(query, "bika_setup_catalog")
        items = map(lambda i: (i.UID, i.Title), instruments)

        instrument = self.getInstrument()
        if instrument:
            instrument_uids = map(api.get_uid, instruments)
            if api.get_uid(instrument) not in instrument_uids:
                items.append(
                    (api.get_uid(instrument), api.get_title(instrument)))

        items.sort(lambda x, y: cmp(x[1], y[1]))
        items.insert(0, ("", _("No instrument")))

        return DisplayList(list(items))
545710
def ports(self):
        ''''''
        with self._mutex:
            if not self._ports:
                self._ports = [ports.parse_port(port, self) \
                               for port in self._obj.get_ports()]
        return self._ports
562269
def devices(self):
        
        if self._devices is None:
            self._devices = DeviceList(self._version, fleet_sid=self._solution['sid'], )
        return self._devices
209930
def ports(self):
        
        # We do here some lazy loading.
        if not self._ports:
            family = self.get_property('adapter-family')
            try:
                port_type = self.port_type_by_family[family]
            except KeyError:
                port_type = None
            self._ports = PortManager(self, port_type)
        return self._ports
616998
def _get_current_output(self):
        
        output = []
        for item in self.items:
            out = self.py3.get_output(item)
            if out and "separator" not in out[-1]:
                out[-1]["separator"] = True
            output += out
        return output
984037
def calc_mb_ports(self):
        
        model = self.device_info['model']
        chassis = self.device_info['chassis']
        num_ports = MODEL_MATRIX[model][chassis]['ports']
        ports = []

        if num_ports > 0:
            port_type = MODEL_MATRIX[model][chassis]['type']

            # Create the ports dict
            for i in range(num_ports):
                port_temp = {'name': PORT_TYPES[port_type] + '0/' + str(i),
                             'id': self.port_id,
                             'port_number': i,
                             'slot_number': 0}
                ports.append(port_temp)
                self.port_id += 1
        self.node['ports'].extend(ports)
1342311
def get_ports(self):
        
        ports = []
        container_ports = self.inspect(refresh=True)["NetworkSettings"]["Ports"]
        if not container_ports:
            return ports
        for p in container_ports:
            # TODO: gracefullness, error handling
            ports.append(p.split("/")[0])
        return ports
1020883
def ports_to_spawn(self):
        
        return (self.config.get(config.HTTP_SERVER, dict()).get(config.PORTS)
                or self.DEFAULT_PORTS)
874246
def ports_as_list(port_str):
    
    if not port_str:
        LOGGER.info("Invalid port value")
        return [None, None]

    if ports_str_check_failed(port_str):
        LOGGER.info("{0}: Port list malformed.")
        return [None, None]

    tcp_list = list()
    udp_list = list()
    ports = port_str.replace(' ', '')
    b_tcp = ports.find("T")
    b_udp = ports.find("U")

    if ports[b_tcp - 1] == ',':
        ports = ports[:b_tcp - 1] + ports[b_tcp:]
    if ports[b_udp - 1] == ',':
        ports = ports[:b_udp - 1] + ports[b_udp:]
    ports = port_str_arrange(ports)

    tports = ''
    uports = ''
    # TCP ports listed first, then UDP ports
    if b_udp != -1 and b_tcp != -1:
        tports = ports[ports.index('T:') + 2:ports.index('U:')]
        uports = ports[ports.index('U:') + 2:]
    # Only UDP ports
    elif b_tcp == -1 and b_udp != -1:
        uports = ports[ports.index('U:') + 2:]
    # Only TCP ports
    elif b_udp == -1 and b_tcp != -1:
        tports = ports[ports.index('T:') + 2:]
    else:
        tports = ports

    if tports:
        for port in tports.split(','):
            if '-' in port:
                tcp_list.extend(port_range_expand(port))
            else:
                tcp_list.append(int(port))
        tcp_list.sort()
    if uports:
        for port in uports.split(','):
            if '-' in port:
                udp_list.extend(port_range_expand(port))
            else:
                udp_list.append(int(port))
        udp_list.sort()

    return (tcp_list, udp_list)
1294238
def is_micropython_usb_port(portName):
    
    for port in serial.tools.list_ports.comports():
        if port.device == portName:
            return is_micropython_usb_device(port)
    return False
47044
def get_ports(device_owners=None, vnic_type=None, port_id=None, active=True):
    """"""
    session = db.get_reader_session()
    with session.begin():
        port_model = models_v2.Port
        ports = (session
                 .query(port_model)
                 .filter_unnecessary_ports(device_owners, vnic_type, active))
        if port_id:
            ports = ports.filter(port_model.id == port_id)
    return ports.all()
102263
def complete_serial_ports(self, text):
        ''''''
        ports = mavutil.auto_detect_serial(preferred_list=preferred_ports)
        return [ p.device for p in ports ]
489466
def _log_board_ports(self, ports):
        
        ports = sorted(ports, key=lambda port: (port.tile_id, port.direction))
        self._logln('ports: {0}'.format(' '.join('{}({} {})'.format(p.type.value, p.tile_id, p.direction)
                                                for p in ports)))
785906
def available_ports(self):
        
        from mbuild.port import Port
        return [port for port in self.labels.values()
                if isinstance(port, Port) and not port.used]