Write container file to IO object +wobj+.
323738
def container(wobj)
      s = @epub.container
      if !s.nil? && !wobj.nil?
        wobj.puts s
      end
    end
243641
def write(self):
        """"""
        with open(storage.config_file, 'w') as cfg:
            yaml.dump(self.as_dict(), cfg, default_flow_style=False)

        storage.refresh()
816996
def createWCSObject(output,default_wcs,imageObjectList):
    """"""
    from . import imageObject
    outwcs = imageObject.WCSObject(output)
    outwcs.default_wcs = default_wcs
    outwcs.wcs = default_wcs.copy()
    outwcs.final_wcs = default_wcs.copy()
    outwcs.single_wcs = default_wcs.copy()

    outwcs.updateContextImage(imageObjectList[0].createContext)

    #
    # Add exptime information for use with drizzle
    #
    outwcs._exptime,outwcs._expstart,outwcs._expend = util.compute_texptime(imageObjectList)

    outwcs.nimages = util.countImages(imageObjectList)

    return outwcs
58584
public static File writeObjectToFile(Object o, File file, boolean append) throws IOException {
    // file.createNewFile(); // cdm may 2005: does nothing needed
    ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(
        new GZIPOutputStream(new FileOutputStream(file, append))));
    oos.writeObject(o);
    oos.close();
    return file;
  }
248770
def write_file(self, blob, dest):
        '''
        
        '''
        with salt.utils.files.fopen(dest, 'wb+') as fp_:
            blob.stream_data(fp_)
98208
def write_data(data, out_file):
    """"""
    with open(out_file, 'w') as handle_out:
        handle_out.write(json.dumps([data], skipkeys=True, indent=2))
116489
public static void writeObjects(OutputStream out, boolean isCloseOut, Serializable... contents) throws IORuntimeException {
		ObjectOutputStream osw = null;
		try {
			osw = out instanceof ObjectOutputStream ? (ObjectOutputStream) out : new ObjectOutputStream(out);
			for (Object content : contents) {
				if (content != null) {
					osw.writeObject(content);
					osw.flush();
				}
			}
		} catch (IOException e) {
			throw new IORuntimeException(e);
		} finally {
			if (isCloseOut) {
				close(osw);
			}
		}
	}
981943
public void writeTo(OutputStream os) throws IOException {
        Wrt wrt = new Wrt(os, this);
        wrt.writeTo();
    }
636850
def writefile(filename, data, binary=False):
    
    try:
        flags = 'w' if not binary else 'wb'
        with open(filename, flags) as _file:
            _file.write(data)
            _file.flush()
            return True

    except (OSError, IOError):
        return False
1083533
def _write_export(export, file_obj=None):
    

    if file_obj is None:
        return export

    if hasattr(file_obj, 'write'):
        out_file = file_obj
    else:
        out_file = open(file_obj, 'wb')
    try:
        out_file.write(export)
    except TypeError:
        out_file.write(export.encode('utf-8'))

    out_file.close()

    return export
1151862
def tofile(self, fileobj):
		
		for entry in self:
			print >>fileobj, str(entry)
		fileobj.close()
879577
async def _dump_container(self, writer, container, container_type, params=None):
        
        await self._dump_container_size(writer, len(container), container_type)

        elem_type = container_elem_type(container_type, params)

        for idx, elem in enumerate(container):
            try:
                self.tracker.push_index(idx)
                await self.dump_field(
                    writer, elem, elem_type, params[1:] if params else None
                )
                self.tracker.pop()
            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e
1212
def write(self, chunk):
        """"""
        if self.chunked_write and chunk:
            chunk_size_hex = hex(len(chunk))[2:].encode('ascii')
            buf = [chunk_size_hex, CRLF, chunk, CRLF]
            self.conn.wfile.write(EMPTY.join(buf))
        else:
            self.conn.wfile.write(chunk)
931674
def FileWriter(path):
    """"""
    try:
        os.makedirs(os.path.dirname(path))
    except OSError:
        pass
    f = open(path, 'w')
    yield ninja_syntax.Writer(f)
    f.close()
26792
function(mode, targetHost, system, containerDef, container, out, newConfig, cb) {

    if (container.specific && container.specific.dockerContainerId && container.specific.configPath && container.specific.hup) {
      tmp.file(function(err, path) {
        if (err) { return cb(err); }

        fs.writeFile(path, newConfig, 'utf8', function(err) {
          if (err) { return cb(err); }

          var copyCmd = commands.generateCopyCommand(container.specific.dockerContainerId, container.specific.configPath, path);
          var hupCmd = commands.generateHupCommand(container);

          executor.exec(mode, copyCmd, config.imageCachePath, out, function(err) {
            if (err) { return cb(err); }
            executor.exec(mode, hupCmd, config.imageCachePath, out, function(err) {
              cb(err);
            });
          });
        });
      });
    }
    else { 
      cb();
    }
  }
183101
def write_dockerfile(self, output_dir):
        
        if not os.path.exists(output_dir):
            os.makedirs(output_dir)

        lines = []
        for istep, step in enumerate(self.steps):
            if istep == 0:
                lines.extend(step.dockerfile_lines)
            else:
                lines.extend(step.dockerfile_lines[1:])
        path = os.path.join(output_dir, 'Dockerfile.%s' % self.imagename)
        with open(path, 'w') as outfile:
            outfile.write('\n'.join(lines))
        print('Wrote %s' % path)
856624
private void writeObject (final ObjectOutputStream aOS) throws IOException
  {
    // Read the data
    if (m_aDFOS.isInMemory ())
    {
      _ensureCachedContentIsPresent ();
    }
    else
    {
      m_aCachedContent = null;
      m_aDFOSFile = m_aDFOS.getFile ();
    }

    // write out values
    aOS.defaultWriteObject ();
  }