Write strings sheet.
557010
def strings(self):
        

        sheet = self.result.add_sheet("strings")
        self.header(sheet, "strings")

        n_row = 1  # row number

        for entry in self.po:
            row = sheet.row(n_row)
            row.write(0, entry.msgid)
            row.write(1, entry.msgstr)
            n_row += 1
            sheet.flush_row_data()
1284084
def write(self, string: str) -> None:
        """"""
        self.logfile.write('\n'.join(
            f'{self._string}{substring}' if substring else ''
            for substring in string.split('\n')))
196200
def writeln (self, s=u"", **args):
        
        self.write(u"%s%s" % (s, unicode(os.linesep)), **args)
209948
private void writeRow(String... columns) throws IOException {
        StringBuilder html = new StringBuilder();
        html.append("<tr>");
        for(String data : columns) {
            html.append("<td>").append(data).append("</td>");
        }
        html.append("</tr>\n");
        writer.write(html.toString());
    }
1010416
def write(self, x):
        """"""
        if self._new_lines:
            if not self._first_write:
                self.stream.write('\n' * self._new_lines)
                self.code_lineno += self._new_lines
                if self._write_debug_info is not None:
                    self.debug_info.append((self._write_debug_info,
                                            self.code_lineno))
                    self._write_debug_info = None
            self._first_write = False
            self.stream.write('    ' * self._indentation)
            self._new_lines = 0
        self.stream.write(x)
237994
def write(str)
      while !str.empty?
        pre,mid,str = str.partition("\n")
        write_str(pre) unless pre.empty?
        writeln unless mid.empty?
      end
    end
314972
def write_sample_sheet(path, accessions, names, celfile_urls, sel=None):
    """"""
    with open(path, 'wb') as ofh:
        writer = csv.writer(ofh, dialect='excel-tab',
                            lineterminator=os.linesep,
                            quoting=csv.QUOTE_NONE)
        # write header
        writer.writerow(['Accession', 'Name', 'CEL file', 'CEL file URL'])
        n = len(names)
        if sel is None:
            sel = range(n)
        for i in sel:
            cf = celfile_urls[i].split('/')[-1]
            # row = [accessions[i], names[i], cf, celfile_urls[i]]
            writer.writerow([accessions[i], names[i], cf, celfile_urls[i]])
294581
def write(self, text, flush=False, error=False, prompt=False):
        """"""
        if prompt:
            self.flush()
        if not is_string(text):
            # This test is useful to discriminate QStrings from decoded str
            text = to_text_string(text)
        self.__buffer.append(text)
        ts = time.time()
        if flush or prompt:
            self.flush(error=error, prompt=prompt)
        elif ts - self.__timestamp > 0.05:
            self.flush(error=error)
            self.__timestamp = ts
            # Timer to flush strings cached by last write() operation in series
            self.__flushtimer.start(50)
597866
def write_string(self):
        

        map_as_str = []
        for name, id_range_set in self.__map.items():
            for id_range in id_range_set:
                map_as_str.append(
                        name + ':' +
                        str(id_range.first) + ':' +
                        str(id_range.count) + '\n'
                    )

        # Remove trailing newline
        if len(map_as_str) > 0:
            map_as_str[-1] = map_as_str[-1][:-1]

        return ''.join(map_as_str)
896806
def write(self, text):
        """"""
        if text:
            if text[0] in '(w':
                # write thread and wsgi messages to debug only
                self.log.debug(text[:-1])
                return
            if self.access_log:
                self.access_log.write(text)
            self.log.info(text[:-1])
408601
private static void writeString(String str, DataOutput writer) throws IOException {
		if (str == null) {
			writer.writeInt(0);
		} else {
			int blocks = str.length() >> 15;
			writer.writeInt(blocks+1);
			int end = 0;
			for (int i=0; i<blocks; i++) {
				int start = end;
				end = (i+1)<<15;
				writer.writeUTF(str.substring(start, end));
			}
			writer.writeUTF(str.substring(end));
		}
	}
774446
def write_line(self, values):
        

        if not self._write_line_init:
            self.init_write_line()

        if len(self._out_widths) > len(values):
            raise For2PyError(f"ERROR: too few values for format {self._format_list}\n")

        out_strs = []
        for i in range(len(self._out_widths)):
            out_fmt = self._out_gen_fmt[i]
            out_width = self._out_widths[i]

            out_val = out_fmt.format(values[i])
            if len(out_val) > out_width:  # value too big for field
                out_val = "*" * out_width

            out_strs.append(out_val)

        out_str_exp = (
            '"' + self._output_fmt + '".format' + str(tuple(out_strs))
        )
        out_str = eval(out_str_exp)
        return out_str + "\n"
161187
void writeSheet(Writer writer) throws WriterException {
        // create sheet
        this.sheet = workbook.createSheet(writer.sheetName());

        // setting styles
        CellStyle headerStyle = Constant.defaultHeaderStyle(workbook);
        CellStyle columnStyle = Constant.defaultColumnStyle(workbook);
        CellStyle titleStyle  = Constant.defaultTitleStyle(workbook);
        if (null != writer.titleStyle()) {
            titleStyle = writer.titleStyle().accept(workbook, titleStyle);
        }
        if (null != writer.headerStyle()) {
            headerStyle = writer.headerStyle().accept(workbook, headerStyle);
        }
        if (null != writer.cellStyle()) {
            columnStyle = writer.cellStyle().accept(workbook, columnStyle);
        }

        if (writer.isRaw()) {
            writer.sheetConsumer().accept(sheet);
        } else {
            // compute the Filed to be written
            Collection<?> rows   = writer.rows();
            Field[]       fields = rows.iterator().next().getClass().getDeclaredFields();

            this.fieldIndexes = new HashMap<>(fields.length);
            this.columns = new ArrayList<>();

            for (Field field : fields) {
                ExcelColumn column = field.getAnnotation(ExcelColumn.class);
                if (null != column) {
                    field.setAccessible(true);
                    fieldIndexes.put(column.index(), field);
                    columns.add(column);
                }
            }

            int colRowIndex = 0;
            // write title
            String title = writer.headerTitle();
            if (StringUtil.isNotEmpty(title)) {
                Integer maxColIndex = columns.stream()
                        .map(ExcelColumn::index)
                        .max(comparingInt(Integer::intValue))
                        .get();

                this.writeHeader(titleStyle, sheet, title, maxColIndex);
                colRowIndex = 1;
            }

            this.rowNum = writer.startRow();
            if (this.rowNum == 0) {
                this.rowNum = colRowIndex + 1;
            }

            try {
                // write column header
                this.writeColumnNames(colRowIndex, headerStyle);

                // write rows
                for (Object row : rows) {
                    this.writeRow(row, columnStyle);
                }
            } catch (Exception e) {
                log.error("write row fail", e);
            }
        }

        // write to OutputStream
        try (OutputStream os = outputStream) {
            workbook.write(os);
        } catch (Exception e) {
            throw new WriterException("workbook write to OutputStream error", e);
        }
    }
128368
def write_line(self, line, count=1):
        """"""
        self.write(line)
        self.write_newlines(count)
453467
def writelines(self, lines, level=0):
        """"""
        for line in lines:
            for line in line.rstrip(u'\n').split(u'\n'):
                self.write(line.rstrip(u'\n'), level=level)
93728
def writeln(self, text, fg='black', bg='white'):
        ''''''
        if not isinstance(text, str):
            text = str(text)
        self.write(text + '\n', fg=fg, bg=bg)
861857
def write(self, *string):
        
        self._output.write(' '.join([six.text_type(s) for s in string]))
        return self