Write a GSFont object to a .glyphs file.
    'fp' should be a (writable) file object.
348778
def dump(obj, fp):
    
    writer = Writer(fp)
    logger.info("Writing .glyphs file")
    writer.write(obj)
1019624
function fsWrite(fd, buffer, position, callback) {
  var offset = 0,
      length = buffer.length;

  function writeChunk() {
    fs.write(fd, buffer, offset, length - offset, position, function (err, bytesWritten) {
      if (err) { callback(err); return; }
      offset += bytesWritten;
      if (offset < length) {
        writeChunk();
        return;
      }
      callback();
    });
  }
  writeChunk();
}
96081
def write(self, path):
        """"""
        with codecs.open(path, 'w', encoding='utf-8') as f:
            f.write(self.text)
227060
def write_fmt(fp, fmt, *args):
    
    fmt = str(">" + fmt)
    fmt_size = struct.calcsize(fmt)
    written = write_bytes(fp, struct.pack(fmt, *args))
    assert written == fmt_size, 'written=%d, expected=%d' % (
        written, fmt_size
    )
    return written
1223713
def writeGifToFile(self, fp, images, durations, loops, xys, disposes):
        
        # Obtain palette for all images and count each occurance
        palettes, occur = [], []
        for im in images:
            header, usedPaletteColors = getheader(im)
            palettes.append(header[-1])  # Last part of the header is the frame palette
        for palette in palettes:
            occur.append(palettes.count(palette))

        # Select most-used palette as the global one (or first in case no max)
        globalPalette = palettes[occur.index(max(occur))]

        # Init
        frames = 0
        firstFrame = True

        for im, palette in zip(images, palettes):

            if firstFrame:
                # Write header

                # Gather info
                header = self.getheaderAnim(im)
                appext = self.getAppExt(loops)

                # Write
                fp.write(header)
                fp.write(globalPalette)
                fp.write(appext)

                # Next frame is not the first
                firstFrame = False

            if True:
                # Write palette and image data

                # Gather info
                data = getdata(im)

                imdes, data = b''.join(data[:-2]), data[-2:]
                graphext = self.getGraphicsControlExt(durations[frames], disposes[frames])
                # Make image descriptor suitable for using 256 local color palette
                lid = self.getImageDescriptor(im, xys[frames])

                # Write local header
                if (palette != globalPalette) or (disposes[frames] != 2):
                    # Use local color palette
                    fp.write(graphext)
                    fp.write(lid)  # write suitable image descriptor
                    fp.write(palette)  # write local color table
                    fp.write('\x08')  # LZW minimum size code
                else:
                    # Use global color palette
                    fp.write(graphext)
                    fp.write(imdes)  # write suitable image descriptor

                for d in data:
                    fp.write(d)

            # Prepare for next round
            frames = frames + 1

        fp.write(";")  # end gif
        return frames
389799
def write_bytes(fp, data):
    
    pos = fp.tell()
    fp.write(data)
    written = fp.tell() - pos
    assert written == len(data), 'written=%d, expected=%d' % (
        written, len(data)
    )
    return written
733950
function (fp) {
    var dest = fp || this.dest.path;
    var src = this.src.path;
    var str = this.content;

    if (str) {
      lazy.write.sync(dest, str);
    } else {
      lazy.copy.sync(src, dest);
    }

    this.emit('write', dest);
    return this;
  }
930670
def write(self, font, feaFile, compiler=None):
        
        self.setContext(font, feaFile, compiler=compiler)
        try:
            if self.shouldContinue():
                return self._write()
            else:
                return False
        finally:
            del self.context
1367658
def write(self, filename=None):
        """"""
        if filename is None:
            filename = self._filename

        exif_bytes = piexif.dump(self._ef)

        with open(self._filename, "rb") as fin:
            img = fin.read()
        try:
            piexif.insert(exif_bytes, img, filename)

        except IOError:
            type, value, traceback = sys.exc_info()
            print >> sys.stderr, "Error saving file:", value
1289821
def compileGSUB(featureFile, glyphOrder):
    
    font = ttLib.TTFont()
    font.setGlyphOrder(glyphOrder)
    addOpenTypeFeatures(font, featureFile, tables={"GSUB"})
    return font.get("GSUB")
1016409
def _write_color_ansi (fp, text, color):
    """"""
    fp.write(esc_ansicolor(color))
    fp.write(text)
    fp.write(AnsiReset)
430547
def write(self, data, *, mode=None, buffering=-1, encoding=None, newline=None):
        '''  '''
        if mode is None:
            mode = 'w' if isinstance(data, str) else 'wb'
        with self.open(mode=mode, buffering=buffering, encoding=encoding, newline=newline) as fp:
            return fp.write(data)
1219641
def write_to_graphic_file (fmt='png', dotfile='graph', params = {})
      src = dotfile + ".dot"
      dot = dotfile + "." + fmt

      File.open(src, 'w') do |f|
        f << self.to_dot_graph(params).to_s << "\n"
      end

      system( "dot -T#{fmt} -o #{dot} #{src}" )
      dot
    end
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)
545387
def write(text, path):
    
    with open(path, "wb") as f:
        f.write(text.encode("utf-8"))
802198
def to_dotfile(G: nx.DiGraph, filename: str):
    
    A = to_agraph(G)
    A.write(filename)
196090
def _write(self, fp):
        """"""
        def write_section(name, section_dict):
            fp.write(("[%s]\n" % name).encode(defenc))
            for (key, value) in section_dict.items():
                if key != "__name__":
                    fp.write(("\t%s = %s\n" % (key, self._value_to_string(value).replace('\n', '\n\t'))).encode(defenc))
                # END if key is not __name__
        # END section writing

        if self._defaults:
            write_section(cp.DEFAULTSECT, self._defaults)
        for name, value in self._sections.items():
            write_section(name, value)