def _saveToFile( self, style, fname ):
      with open( fname, 'w' ) as fout:
         fout.write( MPLSTYLE_HEADER )
         fout.write( "style = MplStyle( '%s' )\n" % (style.name,) )
         self._writeSubStyle( fout, style, 'style' )

   #-----------------------------------------------------------------------
: Save the style to persistent file.
dataset/ETHPy150Open nasa/mplStyle/mplStyle/MplStyleManager.py/MplStyleManager._saveToFile