Write the Playbook output variables.

        This method should be overridden with the output variables defined in the install.json
        configuration file.
542189
def write_output(self):
        
        self.tcex.log.info('Writing Output')
        self.tcex.playbook.create_output('json.pretty', self.pretty_json)
32671
function outputRequireConfigInfo(packedFiles, context, parseOpts, settings) {
    var resMaps = getOutputResourcePathMap(packedFiles, context, parseOpts, settings);
    resMaps.forEach(function(item) {
        var page = item.file;
        var config = context.getRequireConfig(item.paths, settings.amdConfig);
        var script;

        if (settings.inlineResourceConfig) {
            script = _.createRequireConfigScript(config);
        } else {
            var configFile = page.subpathNoExt + '_config.js';
            if (_.isFunction(settings.resourceConfigFile)) {
                configFile = settings.resourceConfigFile(configFile, page);
            }
            configFile = context.createFile(
                configFile,
                _.getRequireConfigScript(config)
            );
            if (context.isFileExisted(configFile)) {
                fis.log.error('output resource config file is exists: %s', configFile.id);
            }

            context.addFile(configFile);
            script = htmlParser.createScriptTags(page, configFile);
        }
        var content = page.getContent().replace(
            parseOpts.resourceConfigPlaceholder, '\n'+script
        );
        page.setContent(content);
    });
}
1054085
def writer(self, outputs, stdout, stderr=sys.stderr):
        
        for output in outputs:
            try:
                output = flatten(output)
                if self.data_interchange_format == "json":
                    # Only dump one json string, and skip another one, maybe key or value.
                    output = filter(lambda x: x, output)
                else:
                    # JSON is already serialized, so we put `self.serialize` in a else statement.
                    output = map(self.serialize, output)
                print("\t".join(output), file=stdout)
            except BaseException:
                print(output, file=stderr)
                raise
1211135
void setOutputVarInited() {
    outputVars.pop();
    outputVars.push(OutputVar.create(currOutputVarName, true));
    currOutputVarIsInited = true;
  }
37635
protected void writeApplyDdl(DdlWrite write) {
        scriptInfo.setApplyDdl(
                "-- drop dependencies\n"
                        + write.applyDropDependencies().getBuffer() + "\n"
                        + "-- apply changes\n"
                        + write.apply().getBuffer()
                        + write.applyForeignKeys().getBuffer()
                        + write.applyHistoryView().getBuffer()
                        + write.applyHistoryTrigger().getBuffer()
        );
    }
782169
def write_to_file(self, out_data):
        
        full_var_name = self.consensus_type + "_" + self.variable
        if "-hour" in self.consensus_type:
            if full_var_name not in out_data.variables.keys():
                var = out_data.createVariable(full_var_name, "f4", ("y", "x"), zlib=True, 
                                              least_significant_digit=3, shuffle=True)
            else:
                var = out_data.variables[full_var_name]
            var.coordinates = "y x"
        else:
            if full_var_name not in out_data.variables.keys():
                var = out_data.createVariable(full_var_name, "f4", ("time", "y", "x"), zlib=True,
                                              least_significant_digit=3, shuffle=True)
            else:
                var = out_data.variables[full_var_name]
            var.coordinates = "time y x"
        var[:] = self.data
        var.units = self.units
        var.long_name = self.consensus_type + "_" + self.variable
        return
530203
def dump():
    

    if not self.isactive():
        lib.echo("ERROR: Enter a project first")
        sys.exit(lib.USER_ERROR)

    # Print custom environment variables first
    custom = sorted(os.environ.get("BE_ENVIRONMENT", "").split())
    if custom:
        lib.echo("Custom:")
        for key in custom:
            lib.echo("- %s=%s" % (key, os.environ.get(key)))

    # Then print redirected variables
    project = os.environ["BE_PROJECT"]
    root = os.environ["BE_PROJECTSROOT"]
    be = _extern.load(project, "be", optional=True, root=root)
    redirect = be.get("redirect", {}).items()
    if redirect:
        lib.echo("\nRedirect:")
        for map_source, map_dest in sorted(redirect):
            lib.echo("- %s=%s" % (map_dest, os.environ.get(map_dest)))

    # And then everything else
    prefixed = dict((k, v) for k, v in os.environ.iteritems()
                    if k.startswith("BE_"))
    if prefixed:
        lib.echo("\nPrefixed:")
        for key in sorted(prefixed):
            if not key.startswith("BE_"):
                continue
            lib.echo("- %s=%s" % (key, os.environ.get(key)))

    sys.exit(lib.NORMAL)
1260550
def write_manifest
      generator = ManifestGenerator.new(spec)

      File.open(@output_dir.join('manifest.json'), 'w') do |f|
        f.write JSON.pretty_generate(generator.spec_as_json)
      end
    end
809818
def write_default_config_file(self, output, comments=True):
        
        if self.use_config_file:
            # pylint: disable-msg=W0621
            log = logging.getLogger('argtoolbox')
            with open(output, 'w') as f:
                if comments:
                    f.write("#####################################\n")
                    f.write("# Description :\n")
                    f.write("# -------------\n# ")
                    for i in self._desc.split('\n'):
                        f.write("# ")
                        f.write(i)
                        f.write("\n")
                    f.write("\n\n")

                for s in self.sections.values():
                    log.debug("loading section : " + s.get_section_name())
                    s.write_config_file(f, comments)
            log.debug("config file generation completed : " + str(output))
199764
public function Write()
    {
        file_put_contents(
            $this->file,
            \Peg\Lib\Utilities\Json::Encode($this->preferences)
        );
    }
839263
def process_module_output(self, module):
        
        outputs = module["module"].get_latest()
        color = module["color"]
        if color:
            for output in outputs:
                # Color: substitute the config defined color
                if "color" not in output:
                    output["color"] = color
        # Create the json string output.
        return ",".join([dumps(x) for x in outputs])
379245
public synchronized void writeJSON(String outputDirectory, boolean bForceWrite) {
        logger.entering(new Object[] { outputDirectory, bForceWrite });

        long currentTime = System.currentTimeMillis();
        if (!bForceWrite && (currentTime - previousTime < ONE_MINUTE)) {
            return;
        }
        previousTime = currentTime;

        parseCompletedTest();

        generateReports(outputDirectory);

        logger.exiting();
    }
128087
def output_for(cmd, options = {})
      output = StringIO.new
      execute(cmd, options.merge(:outstream => output))
      output.string
    end
421267
@GwtIncompatible("Unnecessary")
  void writeOutput(
      Appendable out,
      Compiler compiler,
      @Nullable JSModule module,
      String wrapper,
      String codePlaceholder,
      @Nullable Function<String, String> escaper)
      throws IOException {
    if (compiler.getOptions().outputJs == OutputJs.SENTINEL) {
      out.append("// No JS output because the compiler was run in checks-only mode.\n");
      return;
    }
    checkState(compiler.getOptions().outputJs == OutputJs.NORMAL);

    String code = module == null ? compiler.toSource() : compiler.toSource(module);
    writeOutput(out, compiler, code, wrapper, codePlaceholder, escaper);
  }
891058
def write_data(self,variable_id, value, task):
        
        variable = self._variables[variable_id]
        if task.property_name != '':
            # write the freq property to VariableProperty use that for later read
            vp = VariableProperty.objects.update_or_create_property(variable=variable, name=task.property_name.upper(),
                                                        value=value, value_class='FLOAT64')
            return True
        if variable.visavariable.variable_type == 0:  # configuration
            # only write to configuration variables
            pass
        else:
            return False
746055
def write_input(self, atoms=None, properties=['energy'], system_changes=all_changes):
        ''''''
        with work_dir(self.directory):
            self.calc.write_input(self, atoms, properties, system_changes)
            self.write_pbs_in(properties)
            subprocess.call(self.copy_out_cmd % {
                                'ldir': self.directory,
                                'rdir': self.parameters['rdir'],
                                'user': self.parameters['user'],
                                'host': self.parameters['host']
                            }, shell=True)
37064
public static final void writeScript(Writer writer)
   throws IOException
   {
	   String newline = IO.newline();
	   
	   boolean isWindows = System.getProperty("os.name").startsWith("Windows");
	   
	   String variablePrefix = "$C";
	   String variableSuffix = File.pathSeparator;
	   
	   if(isWindows)
	   {
		   variablePrefix = "%C";
		   variableSuffix = "%"+File.pathSeparator;
	   }
	   
	String setSyntax = isWindows ? "@set " : "export ";
	   
	String classpath = System.getProperty(CLASSPATH_PROP);
	
	String cpath = null;
	
	HashMap<String, HashSet<Object>> map = new HashMap<String, HashSet<Object>>();
	String folderPath = null;
	HashSet<Object> folderPathClassPaths = null;
	
	for(StringTokenizer tok = new StringTokenizer(classpath,File.pathSeparator);tok.hasMoreTokens();)
	{
	   cpath = tok.nextToken();
	   
	   //get path
	   folderPath = IO.parseFolderPath(cpath);
	   
	   //System.out.println("folderPath="+folderPath);
	   
	   //get list for folder path
	   folderPathClassPaths = (HashSet<Object>)map.get(folderPath);
	   
	   //create if needed
	   if(folderPathClassPaths == null)
	   {
		folderPathClassPaths = new HashSet<Object>();
	   }
	   
	   folderPathClassPaths.add(cpath);
	   
	   //put in map
	   map.put(folderPath, folderPathClassPaths);	   	   
	   
	}	
	
	//loop thru keys in map
	int cnt = 0;
	
	
	for(Map.Entry<String, HashSet<Object>> entry : map.entrySet())
	{
	   folderPath = entry.getKey();
	   
	   //get list of classpaths
	   folderPathClassPaths =  entry.getValue();
	   
	   //write variable
	   writer.write(IO.newline());
	   writer.write(setSyntax);
	   writer.write(new StringBuilder(" C").append(cnt).append("=").toString());
	   
	   
	   //loop thru paths
	   int printedCnt = 0;
	   
	   String line = null;
	   for(Iterator<Object> pathI = folderPathClassPaths.iterator();pathI.hasNext();)
	   {
		//limit number of entries per path
		if(printedCnt > limitPerPath)
		{
		   //increment
		   cnt++;
		   
		   writer.write(newline);
		   
		   writer.write(new StringBuilder(setSyntax).append(" C").append(cnt).append("=").toString());
		   
		   printedCnt = 0;
		   
		}
		
		
		
		
		
		line = pathI.next().toString();
		writer.write(line);
		
		printedCnt += line.length();
		
		writer.write(File.pathSeparator);
		
	   }
	   writer.write(newline);
	   writer.write(newline);
	   
	   writer.flush();
	   
	}
	
	//print classpath
	writer.write(setSyntax); writer.write(" CLASSPATH=");
	
	for(int i=0; i <cnt;i++)
	{
	   writer.write(variablePrefix+i);
	   writer.write(variableSuffix);
	   
	}
	writer.write(newline);
	writer.write(newline);
	
	
	writer.write("java <CLASS> <ARG>");


	writer.flush();
	
	writer.write(newline);
	
	writer.write("java  junit.textui.TestRunner <CLASS> <ARG>");
	writer.write(newline);
	
	writer.flush();
	
	
	//System.out.println("File.pathSeparator="+File.pathSeparator);
	//System.out.println("File.separator="+File.separator);
	
	
   }