Dumps object contents into file on disk.

        Args:
          filename (optional): defaults to self.filename. If passed, self.filename
            will be updated to filename.
347251
def save_as(self, filename=None):
        
        if filename is None:
            filename = self.filename
        if filename is None:
            filename = self.default_filename
        if filename is None:
            raise RuntimeError("Class '{}' has no default filename".format(self.__class__.__name__))
        self._do_save_as(filename)
        self.filename = filename
1064413
def write_file(self, filename, content):
        
        with open(filename, 'wb') as f:
            self.log.debug(content)
            f.write(content)
552413
def write_file(self, filename):
        
        with open(filename, "w") as f:
            f.write(self.__str__())
199272
def make_file(self, filename, content):
        
        with open(filename, 'w') as fp:
            fp.write(content)
448572
def save(self, filename):
        ''''''
        try:
            f = open(filename, mode='w')
        except Exception:
            return False
        for k in self.list():
            f.write("%s=%s\n" % (k, self.get(k)))
        f.close()
        return True
1258097
def get_file_contents(filename):
    
    data = None
    try:
        with open(filename) as pf:
            data = pf.read()
    except IOError:
        # File not found, return None
        pass
    return data
287917
def addFilename( self, filename ):
        
        filename = os.path.normpath(nativestring(filename))
        
        if filename in self._filenames:
            self._filenames.remove(filename)
        
        self._filenames.insert(0, filename)
        self._filenames = self._filenames[:self.maximumLength()]
        
        self.refresh()
1213354
def dump_data(self, filename, queryset):
        
        with gzip.open(filename, "wb") as f:
            for outbound in queryset.iterator():
                data = OutboundArchiveSerializer(outbound).data
                data = JSONRenderer().render(data)
                f.write(data)
                f.write("\n".encode("utf-8"))
352299
def save(obj, filename, protocol=4):
    

    with open(filename, 'wb') as f:
        pickle.dump(obj, f, protocol=protocol)
1229856
def save(self, filename, callback=_noop_callback):
        
        with open(filename, 'wb') as fp:
            self._save(fp, callback)
1129974
def save(self, filename):
        ''' 
        '''
        with open(filename, 'w') as outfile:
            json.dump(self.to_json(), outfile)
1053210
def put(self, filename, data):
        
        # Open the file for writing on the board and write chunks of data.
        self._pyboard.enter_raw_repl()
        self._pyboard.exec_("f = open('{0}', 'wb')".format(filename))
        size = len(data)
        # Loop through and write a buffer size chunk of data at a time.
        for i in range(0, size, BUFFER_SIZE):
            chunk_size = min(BUFFER_SIZE, size - i)
            chunk = repr(data[i : i + chunk_size])
            # Make sure to send explicit byte strings (handles python 2 compatibility).
            if not chunk.startswith("b"):
                chunk = "b" + chunk
            self._pyboard.exec_("f.write({0})".format(chunk))
        self._pyboard.exec_("f.close()")
        self._pyboard.exit_raw_repl()
253760
def writetofile(self, filename):
        ''''''
        f = open(filename, "w")
        f.write(self.read())
        f.close()
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)
1032457
def save(self, name, file):
        
        # Get the proper name for the file, as it will actually be saved.
        if name is None:
            name = file.name

        if not hasattr(file, 'chunks'):
            file = File(file, name=name)

        name = self.get_available_name(name)
        name = self._save(name, file)

        # Store filenames with forward slashes, even on Windows
        return name.replace('\\', '/')
286093
def save(self, filename):
        
        clibrebound.reb_output_binary(byref(self), c_char_p(filename.encode("ascii")))
84359
def dump(self, filename):
        
        f = open(filename, 'w')
        cPickle.dump(self, f)