Publish and return the output from the underlying process.
960729
@Override
    public String output() {
        String output = process.output();
        publisher.publish(new Returned(command, output));
        return output;
    }
987551
function publish(conn, channel, indices, message) {
  var i
    , conn;
  for(i = 0;i < indices.length;i++) {
    conn = this._state.getClient(indices[i]);
    if(conn) {
      conn.write(message);
    }
  }
}
563411
def _emit_message(cls, message):
        """"""
        sys.stdout.write(message)
        sys.stdout.flush()
687636
def get_output(command):
    """"""
    p = Popen(command, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
    p.stdin.close()
    p.stderr.close()
    line=p.stdout.readline().strip()
    p.wait()
    if type(line).__name__ == "bytes":
        line = str(line, encoding="utf-8")
    return line, p.returncode
330498
def publish(self, topic, payload = None, qos = 0, retain = False):
        """"""
        #print "PUBLISHING (",topic,"): ", payload
        payloadlen = len(payload)
        if topic is None or qos < 0 or qos > 2:
            print "PUBLISH:err inval"
            return NC.ERR_INVAL
        
        #payloadlen <= 250MB
        if payloadlen > (250 * 1024 * 1204):
            self.logger.error("PUBLISH:err payload len:%d", payloadlen)
            return NC.ERR_PAYLOAD_SIZE
        
        #wildcard check : TODO
        mid = self.mid_generate()
        
        if qos in (0,1,2):
            return self.send_publish(mid, topic, payload, qos, retain, False)

        else:
            self.logger.error("Unsupport QoS= %d", qos)
    
        return NC.ERR_NOT_SUPPORTED
1263727
private void generateOutput() {
    final Filer filer = processingEnv.getFiler();
    writeJsonToFile(filer, "JSONClasses", jsonClasses);
    writeJsonToFile(filer, "debugcrud", debugMessages);

    final List<ResourceMethod> resources = Lists.newArrayList();
    for (ResourceClass klass : resourceClasses.values()) {
      final String path = klass.getPath();

      for (final ResourceMethod method : klass.getMembers()) {
        resources.add(new ResourceMethod("", method.getMethod(),
            computeDisplayPath(path, method.getPath()),
            method.getReturnContentType(), method.getReturnType(), method.getArguments(),
            method.getJavadoc()));
      }
    }
    writeJsonToFile(filer, "RESTEndpoints", resources);
  }
815771
def publish (self):
        '''
         
        '''
        self.lock.acquire()
        tw = cmdvel2Twist(self.vel)
        self.lock.release()
        if (self.jdrc.getState() == "flying"):
            self.pub.publish(tw)
1176502
def get_build_output(self, process):
        

        while True:
            output = process.stdout.readline()
            if output == b'' and process.poll() is not None:
                if process.returncode > 0:
                    raise Exception("Compilation ended with an error"
                                    ".\nSTDERR\n%s\nSTDOUT\n%s" %
                                    (process.stderr.read(),
                                     process.stdout.read()))
                return
            if output:
                # Parse the output to get current and total tasks
                # This assumes the progress displayed by waf is in the form
                # [current/total]
                matches = re.search(r'\[\s*(\d+?)/(\d+)\].*',
                                    output.strip().decode('utf-8'))
                if matches is not None:
                    yield [int(matches.group(1)), int(matches.group(2))]
365210
def run(self):
        ''''''
        with spawn_output_reader() as (stdout_capture, stdout_thread):
            with spawn_output_reader() as (stderr_capture, stderr_thread):
                context = starter_iocontext(stdout_capture, stderr_capture)
                status = self._exec(context)
        stdout_bytes = stdout_thread.join()
        stderr_bytes = stderr_thread.join()
        result = Result(status.code, stdout_bytes, stderr_bytes)
        if is_checked_error(status):
            raise StatusError(result, self)
        return result
347540
def Publish(self, request, context):
        """"""
        LOG.debug("Publish called")
        try:
            self.plugin.publish(
                [Metric(pb=m) for m in request.Metrics],
                ConfigMap(pb=request.Config)
            )
            return ErrReply()
        except Exception as err:
            msg = "message: {}\n\nstack trace: {}".format(
                err, traceback.format_exc())
            return ErrReply(error=msg)
1057477
def output_capturing():
    """"""
    out = sys.stdout

    sys.stdout = StringIO()

    try:
        yield

    finally:
        sys.stdout = out
622034
def publish(self):
        '''
        
        '''

        self.cleanup

        remote = self.remote
        branch = self.branch
        return self.m(
            'pushing changes to %s/%s' % (remote, branch),
            cmdd=dict(
                cmd='git push -u %s %s' % (remote, branch),
                cwd=self.local
            ),
            more=dict(remote=remote, branch=branch)
        )
111595
def process_action(self):
        
        if self.publish_version == self.UNPUBLISH_CHOICE:
            actioned = self._unpublish()
        else:
            actioned = self._publish()

        # Only log if an action was actually taken
        if actioned:
            self._log_action()

        return actioned
921607
def py(self, output):
        """"""
        import pprint
        pprint.pprint(output, stream=self.outfile)
1236811
def publish(self, rawtx):
        """"""
        tx = deserialize.signedtx(rawtx)
        if not self.dryrun:
            self.service.send_tx(tx)
        return serialize.txid(tx.hash())
1205640
def output(self):
        
        return luigi.LocalTarget(path=self.path(digest=True, ext='html'))
852497
def read(self):
        """"""
        if self._process and self._process.poll() is not None:
            ip = get_ipython()
            err = ip.user_ns['error'].read().decode()
            out = ip.user_ns['output'].read().decode()
        else:
            out = ''
            err = ''
        return out, err