Send to the resource in use: send *IDN?
178563
def do_write(self, args):
        

        if not self.current:
            print('There are no resources in use. Use the command "open".')
            return

        try:
            self.current.write(args)
        except Exception as e:
            print(e)
1057357
def _send(self):
        
        if not statsd:
            return
        for metric in self.metrics:

            # Split the path into a prefix and a name
            # to work with the statsd module's view of the world.
            # It will get re-joined by the python-statsd module.
            #
            # For the statsd module, you specify prefix in the constructor
            # so we just use the full metric path.
            (prefix, name) = metric.path.rsplit(".", 1)
            logging.debug("Sending %s %s|g", name, metric.value)

            if metric.metric_type == 'GAUGE':
                if hasattr(statsd, 'StatsClient'):
                    self.connection.gauge(metric.path, metric.value)
                else:
                    statsd.Gauge(prefix, self.connection).send(
                        name, metric.value)
            else:
                # To send a counter, we need to just send the delta
                # but without any time delta changes
                value = metric.raw_value
                if metric.path in self.old_values:
                    value = value - self.old_values[metric.path]
                self.old_values[metric.path] = metric.raw_value

                if hasattr(statsd, 'StatsClient'):
                    self.connection.incr(metric.path, value)
                else:
                    statsd.Counter(prefix, self.connection).increment(
                        name, value)

        if hasattr(statsd, 'StatsClient'):
            self.connection.send()
        self.metrics = []
747213
def send(self, api, force_send):
        
        item_id = self.get_existing_item_id(api)
        if not item_id:
            item_id = self.create_item_returning_id(api)
            api.send_item(self.destination, item_id, force_send)
        else:
            if force_send:
                api.send_item(self.destination, item_id, force_send)
            else:
                item_type = D4S2Api.DEST_TO_NAME.get(self.destination, "Item")
                msg = "{} already sent. Run with --resend argument to resend."
                raise D4S2Error(msg.format(item_type), warning=True)
1006527
def send_signal(signal, request, user, **kwargs):
    '''
    '''
    params = {
        'user_ip': request.remote_addr
    }
    params.update(kwargs)
    if user.is_authenticated:
        params['uid'] = user.id
    signal.send(request.url, **params)
368285
def send(self, subname, value):
        '''
        '''
        assert isinstance(value, compat.NUM_TYPES)
        return self._send(subname, value)
264125
def _send_cmd(self, cmd: str):
        """"""
        self._sock.sendall(cmd.encode(encoding='latin-1', errors='strict'))
760682
def _send(key, value, metric_type):
    
    if STATSD_PREFIX:
        key = '.'.join([STATSD_PREFIX, key])
    try:
        STATSD_SOCKET.sendto('{0}:{1}|{2}'.format(key,
                                                  value,
                                                  metric_type).encode(),
                             STATSD_ADDR)
    except socket.error:
        LOGGER.exception(SOCKET_ERROR)
1325331
def method_missing(name, *args, &block) # :nodoc:
      if writable_master.respond_to?(name)
        Client.send(:send_to_master, name)
        send(name, *args, &block)
      else
        super
      end
    end
515838
def cli(env, identifier):
    """"""

    mgr = SoftLayer.NetworkManager(env.client)
    global_ip_id = helpers.resolve_id(mgr.resolve_global_ip_ids, identifier,
                                      name='global ip')
    mgr.unassign_global_ip(global_ip_id)
59086
def _send(self, data):
        """"""
        try:
            self._sock.sendto(data.encode('ascii'), self._addr)
        except (socket.error, RuntimeError):
            # No time for love, Dr. Jones!
            pass
1056147
def send(self, subname, value, timestamp=None):
        '''
        '''
        if timestamp is None:
            ts = int(dt.datetime.now().strftime("%s"))
        else:
            ts = timestamp
        name = self._get_name(self.name, subname)
        self.logger.info('%s: %s %s' % (name, value, ts))
        return statsd.Client._send(self, {name: '%s|r|%s' % (value, ts)})
796475
def send(self, obj):
        """"""
        assert isinstance(obj, ProtocolBase)
        string = pickle.dumps(obj)
        length = len(string)
        self.sock.sendall(struct.pack("<I", length) + string)
742168
def send_id(self, tok, force_auth):
        '''
        
        '''
        load = {'id': self.opts['id'], 'tok': tok}

        @tornado.gen.coroutine
        def _do_transfer():
            msg = self._package_load(self.auth.crypticle.dumps(load))
            package = salt.transport.frame.frame_msg(msg, header=None)
            yield self.message_client.write_to_stream(package)
            raise tornado.gen.Return(True)

        if force_auth or not self.auth.authenticated:
            count = 0
            while count <= self.opts['tcp_authentication_retries'] or self.opts['tcp_authentication_retries'] < 0:
                try:
                    yield self.auth.authenticate()
                    break
                except SaltClientError as exc:
                    log.debug(exc)
                    count += 1
        try:
            ret = yield _do_transfer()
            raise tornado.gen.Return(ret)
        except salt.crypt.AuthenticationError:
            yield self.auth.authenticate()
            ret = yield _do_transfer()
            raise tornado.gen.Return(ret)
281049
def send_pid(cls, sock, pid):
    """"""
    assert(isinstance(pid, IntegerForPid) and pid > 0)
    encoded_int = cls.encode_int(pid)
    cls.write_chunk(sock, ChunkType.PID, encoded_int)
1332377
def send(self, msg, timeout=None):
        
        arb_id = msg.arbitration_id
        if msg.is_extended_id:
            arb_id |= NC_FL_CAN_ARBID_XTD
        raw_msg = TxMessageStruct(arb_id,
                                  bool(msg.is_remote_frame),
                                  msg.dlc,
                                  CanData(*msg.data))
        nican.ncWrite(
            self.handle, ctypes.sizeof(raw_msg), ctypes.byref(raw_msg))
361346
def send(method, params = [], id = nil)
      check_auth()

      json = {
        :id => id.nil? || id.is_a?(Integer) == false ? rand(999 - 100) + 100 : id,
        :jsonrpc => "2.0",
        :method => method,
        :params => params.is_a?(Array) ? params : []
      }.to_json

      uri = URI.parse(API_URL)
      http = http_or_http_proxy(uri)

      req = Net::HTTP::Post.new(uri.request_uri, @headers)
      req.basic_auth(@login, @password)
      req.add_field('User-Agent', "sdk=RUBY; sdk-version=#{SDK_VERSION}; lang-version=#{RUBY_VERSION}; platform=#{RUBY_PLATFORM}")
      req.add_field('CALLR-Login-As', @login_as) unless @login_as.to_s.empty?

      begin
        res = http.request(req, json)
        if res.code.to_i != 200
          raise CallrException.new("HTTP_CODE_ERROR", -1, {:http_code => res.code.to_i, :http_message => res.message})
        end
        return parse_response(res)
      rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Errno::ETIMEDOUT, Errno::ECONNREFUSED,
          Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
        raise CallrException.new("HTTP_EXCEPTION", -2, {:exception => e})
      end
    end
408473
def send_env_text(self, text, episode_id):
        '''  '''
        reactor.callFromThread(self._send_env_text, text, episode_id)