The result of put_everything_together() function is writen in a file.
        Takes:
            * output_name * - name for the output file
967337
def write_final_draw_file(self, output_name):
        
        finalsvg = open(output_name+".svg","w")
        finalsvg.writelines(self.final_molecule)
        finalsvg.close()
315917
function (files, output, name) {
    this.files = files;
    this.outputfile = path.resolve(output || os.tmpdir()) + path.sep + (name || '.check');
    this.data = {};
}
966232
def _put_output(self, output: Optional[str]) -> None:
        """"""
        if output is None:
            self._argv.extend(["-f", "null", "-"])
            return

        output_cmd = shlex.split(str(output))
        if len(output_cmd) > 1:
            self._argv.extend(output_cmd)
        else:
            self._argv.append(output)
1231695
def output(self, name: str, value: Any):
        
        self.outputs[name] = value
321012
def write_file(data, outfilename):
    """"""
    if not data:
        return False
    try:
        with open(outfilename, 'w') as outfile:
            for line in data:
                if line:
                    outfile.write(line)
        return True
    except (OSError, IOError) as err:
        sys.stderr.write('An error occurred while writing {0}:\n{1}'
                         .format(outfilename, str(err)))
        return False
742807
def collect_output(mr_out_dir, out_file=None):
    
    if out_file is None:
        output = []
        for fn in iter_mr_out_files(mr_out_dir):
            with hdfs.open(fn, "rt") as f:
                output.append(f.read())
        return "".join(output)
    else:
        block_size = 16777216
        with open(out_file, 'a') as o:
            for fn in iter_mr_out_files(mr_out_dir):
                with hdfs.open(fn) as f:
                    data = f.read(block_size)
                    while len(data) > 0:
                        o.write(data)
                        data = f.read(block_size)
758026
def __get_output_filenames(self):
        
        # if there is only one file, use the normal filename with nothing appended.
        if len(self.noaa_data_sorted["Data"]) == 1:
            self.output_filenames.append(self.filename_txt)

        # if there are multiple files that need to be written out, (multiple data table pairs), then append numbers
        elif len(self.noaa_data_sorted["Data"]) > 1:
            for i in range(0, self.output_file_ct):
                tmp_name = "{}-{}.txt".format(self.dsn, i+1)
                self.output_filenames.append(tmp_name)
        return
845372
def write(self, filename = ""):
        
        file_data = str(self)
        if filename:
            try:
                self.__write(filename, file_data)
            except IOError:
                raise IOError("File could not be opened for write operations.")
        else:
            return file_data
487430
def output(self, _filename):
        

        txt = ""
        for contract in self.contracts:
            print('Contract {}'.format(contract.name))
            for function in contract.functions:
                if function.contract == contract:
                    print('\tFunction {}'.format(function.full_name))
                    for node in function.nodes:
                        if node.expression:
                            print('\t\tExpression: {}'.format(node.expression))
                            print('\t\tIRs:')
                            for ir in node.irs:
                                print('\t\t\t{}'.format(ir))
                        elif node.irs:
                            print('\t\tIRs:')
                            for ir in node.irs:
                                print('\t\t\t{}'.format(ir))
            for modifier in contract.modifiers:
                if modifier.contract == contract:
                    print('\tModifier {}'.format(modifier.full_name))
                    for node in modifier.nodes:
                        print(node)
                        if node.expression:
                            print('\t\tExpression: {}'.format(node.expression))
                            print('\t\tIRs:')
                            for ir in node.irs:
                                print('\t\t\t{}'.format(ir))
        self.info(txt)
463640
def write (self, s, **args):
        
        if self.filename is not None:
            self.start_fileoutput()
        if self.fd is None:
            # Happens when aborting threads times out
            log.warn(LOG_CHECK, "writing to unitialized or closed file")
        else:
            try:
                self.fd.write(s, **args)
            except IOError:
                msg = sys.exc_info()[1]
                log.warn(LOG_CHECK,
                    "Could not write to output file: %s\n"
                    "Disabling log output of %s", msg, self)
                self.close_fileoutput()
                self.fd = dummy.Dummy()
                self.is_active = False
168820
def writeto(self, filename, **kwargs):
        
        fits.PrimaryHDU(header=self).writeto(filename, output_verify='ignore', **kwargs)
49527
def do_parse(infilename: str, outfilename: str, verbose: bool) -> bool:
    
    python = parse(FileStream(infilename, encoding="utf-8"), infilename)
    if python is not None:
        with open(outfilename, 'w') as outfile:
            outfile.write(python)
        if verbose:
            print("Output written to {}".format(outfilename))
        return True
    return False
368913
def _WriteOutputValues(self, output_values):
    
    for index, value in enumerate(output_values):
      if not isinstance(value, py2to3.STRING_TYPES):
        value = ''
      output_values[index] = value.replace(',', ' ')

    output_line = ','.join(output_values)
    output_line = '{0:s}\n'.format(output_line)
    self._output_writer.Write(output_line)
625204
def temp_output_file(prefix="tmp", suffix="", dir=None, make_parents=False, always_clean=False):
  
  return _temp_output(False, prefix=prefix, suffix=suffix, dir=dir, make_parents=make_parents,
                      always_clean=always_clean)
227312
function outputPages(names, cb) {
    if (typeof names === 'function') { cb = names; names = ''; }

    names = u.isArray(names) ? names :
           names ? [names] :
           u.keys(opts.output$);

    var ab = asyncbuilder(cb);

    u.each(names, function(name) {
      var output = opts.output$[name];
      if (output) {
        output.output(ab.asyncAppend());
      } else {
        ab.append('outputPages called with unknown output: ' + name);
      }
    });

    ab.complete();
  }
800413
def print_result(self, directory_result):
        
        for file_name, line_results_dict in directory_result.iter_line_results_items():
            full_path = path.join(directory_result.directory_path, file_name)
            self.write(full_path, 'green')
            self.write('\n')
            for line_number, line_results in sorted(line_results_dict.items()):
                self.write('%s: ' % (line_results[0].line_number))
                out = list(line_results[0].left_of_group + line_results[0].group + line_results[0].right_of_group)
                offset = 0
                for line_result in line_results:
                    group_length = len(line_result.group)
                    out.insert(offset+line_result.left_offset-1, self.colors['blue'])
                    out.insert(offset+line_result.left_offset+group_length, self.colors['end'])
                    offset += group_length + 1
                self.write(''.join(out)+'\n')
            self.write('\n')
1244408
def dump(self, fname):
        
        with open(fname, 'wb') as f:
            f.write(self.output)