Save in `fname` the content of `texts`.
973334
def save_texts(fname:PathOrStr, texts:Collection[str]):
    ""
    with open(fname, 'w') as f:
        for t in texts: f.write(f'{t}\n')
318166
def save_file(self, filename, text):
        """"""
        if not filename.endswith('.py'):
            filename += '.py'
        path = os.path.join(self.currentpath, filename)
        with open(path, 'w', encoding="utf-8") as file_:
            file_.write(text)
1243383
def save fname, options={}
      File.open(fname,"wb"){ |f| f << export(options) }
    end
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))
42942
def load(cls, fname):
        
        with open(fname) as f:
            content = f.readlines()
        return Flow.from_json(''.join(content))
37482
def to_text(self, filename=None, overwrite=True):
        '''
        
        '''

        table = self.standardized
        #table = hstack([self.identifiers,
        #                self._coordinate_table(),
        #                self.magnitudes,
        #                self.errors])

        if filename == None:
            filename = '{}.txt'.format(self.name)
        self.speak('saving to {}'.format(filename))
        table.write(filename, format='ascii.ecsv', overwrite=overwrite)
1216556
def record_to_fs(self):
        """"""

        fr = self.record

        if fr.contents:
            with self._fs.open(self.file_name, 'w', encoding='utf-8') as f:
                self.record_to_fh(f)
1049068
def dump(self, **kwargs):
    """"""

    f = io.StringIO()
    w = Writer(f, self.keys, **kwargs)
    w.write(self)
    text = f.getvalue().lstrip()
    f.close()

    return text
1267990
def open_text(fn:PathOrStr, enc='utf-8'):
    ""
    with open(fn,'r', encoding = enc) as f: return ''.join(f.readlines())
1328023
def write_text(self, name, s):
        """"""
        buf = io.BytesIO(compat.to_bytes(s))
        self.write_file(name, buf)
872827
def save(self, fname):
        
        with open(fname, 'wb') as f:
            json.dump(self, f)
873305
def save(self, filename):
        """"""
        filename = pathlib.Path(filename)
        out = []
        keys = sorted(list(self.keys()))
        for key in keys:
            out.append("[{}]".format(key))
            section = self[key]
            ikeys = list(section.keys())
            ikeys.sort()
            for ikey in ikeys:
                var, val = keyval_typ2str(ikey, section[ikey])
                out.append("{} = {}".format(var, val))
            out.append("")

        with filename.open("w") as f:
            for i in range(len(out)):
                # win-like line endings
                out[i] = out[i]+"\n"
            f.writelines(out)
1095770
def keepOriginalText(s,startLoc,t):
    """"""
    try:
        endloc = getTokensEndLoc()
    except ParseException:
        raise ParseFatalException("incorrect usage of keepOriginalText - may only be called as a parse action")
    del t[:]
    t += ParseResults(s[startLoc:endloc])
    return t
1173042
def save(self, filename):
        """"""
        with open(filename, 'w') as fp:
            fp.write(str(self))
684796
def save(self, fname=''):
        
        if fname != '':
            with open(fname, 'w') as f:
                for t in self.lstTools:
                    self.verify(t)
                    f.write(self.tool_as_string(t))
1032697
def save(self, outfile):
        """"""
        if isinstance(outfile, compat.string_type):
            outfile = open(outfile, 'wb')
        outfile.write(self._contents)
909616
def text(name)
      accum = []
      each do |f|
        if f.name? name
          accum << f.to_text
        end
      end
      accum
    end