Save properties to a file.
489943
@SuppressWarnings("resource")
	public static ISynchronizationPoint<IOException> savePropertiesFile(Properties properties, File file, Charset charset, byte priority) {
		FileIO.ReadWrite io = new FileIO.ReadWrite(file, priority);
		AsyncWork<Void,IOException> resize = io.setSizeAsync(0);
		SynchronizationPoint<IOException> result = new SynchronizationPoint<>();
		resize.listenInline(new Runnable() {
			@Override
			public void run() {
				if (resize.hasError()) {
					result.error(resize.getError());
					io.closeAsync();
					return;
				}
				savePropertiesFile(properties, io, charset, priority, true).listenInline(result);
			}
		});
		return result;
	}
1120433
def save_to_file(self, fname):
        
        with open(fname, 'w') as f:
            f.write(str(self))
1077079
def dump(cls, filename, objects, properties, bools, encoding):
        """"""
        if encoding is None:
            encoding = cls.encoding

        source = cls.dumps(objects, properties, bools)
        if PY2:
            source = unicode(source)

        with io.open(filename, 'w', encoding=encoding) as fd:
            fd.write(source)
956152
def save(self):
        """"""
        with open(self._config_file_path, 'w') as file:
            self._config_parser.write(file)
1365964
def save(self, filename):
        """"""
        proxies = {'http': [], 'https': []}
        for protocol in ['http', 'https']:
            for proxy in self.proxies[protocol]:
                serializable_proxy = self.proxies[protocol][proxy].to_dict()
                proxies[protocol].append(serializable_proxy)
        with open(filename, 'w') as fout:
            json.dump(proxies, fout)
981751
def save(self):
        """"""
        with open(self.file_name, 'w') as fp:
            self.parser.write(fp)
        return self
1209622
def save(self, filename, verbose=False):
        
        with open(filename, 'w') as fid:
            json.dump(self._conf, fid, indent=4)
        if verbose:
            print('Saved settings in ' + filename)
580246
def save(self, filename, config):
        """"""
        return open(os.path.expanduser(filename), 'w').write(json.dumps(config, cls=HCEncoder, sort_keys=True, indent=2, separators=(',', ': ')))
1114375
protected void saveProperties(CmsPropertyChangeSet changes, AsyncCallback<Void> callback) {

        if (m_propertySaver != null) {
            m_propertySaver.saveProperties(changes, callback);
        } else {
            CmsCoreProvider.getVfsService().saveProperties(changes, callback);
        }
    }
1259802
public static void save( File f, ApplicationTemplateDescriptor descriptor ) throws IOException {

		Properties properties = new Properties();
		if( descriptor.name != null )
			properties.setProperty( APPLICATION_NAME, descriptor.name );

		if( descriptor.version != null )
			properties.setProperty( APPLICATION_VERSION, descriptor.version );

		if( descriptor.dslId != null )
			properties.setProperty( APPLICATION_DSL_ID, descriptor.dslId );

		if( descriptor.description != null )
			properties.setProperty( APPLICATION_DESCRIPTION, descriptor.description );

		if( descriptor.graphEntryPoint != null )
			properties.setProperty( APPLICATION_GRAPH_EP, descriptor.graphEntryPoint );

		if( descriptor.instanceEntryPoint != null )
			properties.setProperty( APPLICATION_INSTANCES_EP, descriptor.instanceEntryPoint );

		if( descriptor.externalExportsPrefix != null )
			properties.setProperty( APPLICATION_EXTERNAL_EXPORTS_PREFIX, descriptor.externalExportsPrefix );

		StringBuilder sb = new StringBuilder();
		for( Iterator<Map.Entry<String,String>> it = descriptor.externalExports.entrySet().iterator(); it.hasNext(); ) {
			Map.Entry<String,String> entry = it.next();
			sb.append( entry.getKey());
			sb.append( " " );
			sb.append( APPLICATION_EXTERNAL_EXPORTS_AS );
			sb.append( " " );
			sb.append( entry.getValue());
			if( it.hasNext())
				sb.append( ", " );
		}

		if( sb.length() > 0 )
			properties.setProperty( APPLICATION_EXTERNAL_EXPORTS, sb.toString());

		properties.setProperty( APPLICATION_TAGS, Utils.format( descriptor.tags, ", " ));
		Utils.writePropertiesFile( properties, f );
	}
545515
def save_files(self, selections) -> None:
        """"""
        try:
            currentpath = self.currentpath
            selections = selectiontools.Selections(selections)
            for selection in selections:
                if selection.name == 'complete':
                    continue
                path = os.path.join(currentpath, selection.name+'.py')
                selection.save_networkfile(filepath=path)
        except BaseException:
            objecttools.augment_excmessage(
                'While trying to save selections `%s` into network files'
                % selections)
1329080
public void store(File file) throws IOException {
        try (val s = new FileOutputStream(file, false)) {
            this.properties.store(s, "");
        }
    }
1032697
def save(self, outfile):
        """"""
        if isinstance(outfile, compat.string_type):
            outfile = open(outfile, 'wb')
        outfile.write(self._contents)
343447
def save(self, name, data, location='local', kind='json'):
        """"""
        file_ext = '.json' if kind == 'json' else '.pkl'
        path = self._get_path(name, location, file_ext=file_ext)
        _ensure_dir_exists(op.dirname(path))
        logger.debug("Save data to `%s`.", path)
        if kind == 'json':
            _save_json(path, data)
        else:
            _save_pickle(path, data)
502278
def _create_properties(self):
        """"""
        self._rcbag = {}  # bag for row/column prop editors
        self._fgrid = f = ttk.Labelframe(self._sframe.innerframe,
                                         text=_('Grid options:'), padding=5)
        f.grid(sticky='nswe')
        #  hack to resize correctly when properties are hidden
        label = ttk.Label(f)
        label.grid()

        label_tpl = "{0}:"
        row = 0
        col = 0

        groups = (
            ('00', properties.GRID_PROPERTIES, properties.LAYOUT_OPTIONS),
        )

        for gcode, plist, propdescr in groups:
            for name in plist:
                kwdata = propdescr[name]
                labeltext = label_tpl.format(name)
                label = ttk.Label(self._fgrid, text=labeltext, anchor=tk.W)
                label.grid(row=row, column=col, sticky=tk.EW, pady=2)
                widget = self._create_editor(self._fgrid, name, kwdata)
                widget.grid(row=row, column=col+1, sticky=tk.EW, pady=2)
                row += 1
                self._propbag[gcode+name] = (label, widget)

        # Grid row/col properties
        #labels
        gcode = '01'
        self._fgrc = fgrc = ttk.LabelFrame(self._sframe.innerframe,
                                           text=_('Grid row/column options:'),
                                           padding=5)
        fgrc.grid(row=1, column=0, sticky=tk.NSEW, pady='10 0')

        #hack to resize correctly when properties are hidden
        label = ttk.Label(fgrc)
        label.grid()

        row = col = 0
        icol = 1
        headers = []
        for pname in properties.GRID_RC_PROPERTIES:
            label = ttk.Label(fgrc, text=pname)
            label.grid(row=row, column=icol)
            headers.append(label)
            icol += 1
        self._internal = {'grc_headers': headers}

        #
        name_format = '{}_{}_{}'  # {row/column}_{number}_{name}
        MAX_RC = 50
        #rowconfig
        row += 1
        trow_label = _('Row {0}:')
        tcol_label = _('Column {0}:')
        for index in range(0, MAX_RC):
            labeltext = trow_label.format(index)
            label = ttk.Label(fgrc, text=labeltext)
            label.grid(row=row, column=0)

            labeltext = tcol_label.format(index)
            labelc = ttk.Label(fgrc, text=labeltext)
            labelc.grid(row=row + MAX_RC, column=0, sticky=tk.E, pady=2)

            icol = 1
            for pname in properties.GRID_RC_PROPERTIES:
                kwdata = properties.LAYOUT_OPTIONS[pname]

                alias = name_format.format('row', index, pname)
                widget = self._create_editor(fgrc, alias, kwdata)
                widget.grid(row=row, column=icol, pady=2, sticky='ew')
                self._rcbag[alias] = (label, widget)

                alias = name_format.format('column', index, pname)
                widget = self._create_editor(fgrc, alias, kwdata)
                widget.grid(row=row + MAX_RC, column=icol, pady=2, sticky='ew')
                self._rcbag[alias] = (labelc, widget)

                icol += 1
            row += 1
1111815
def save(self):
        """"""
        file_name = fd.asksaveasfilename()
        if file_name is "" or file_name is None:
            return
        with open(file_name, "w") as f:
            f.write(self.text.get("1.0", tk.END))
1129974
def save(self, filename):
        ''' 
        '''
        with open(filename, 'w') as outfile:
            json.dump(self.to_json(), outfile)