gencharts/__init__.py
def _write_file(self, slug, folderpath, html):
        """
        Writes a chart's html to a file
        """
        # check directories

        if not os.path.isdir(folderpath):
            try:
                os.makedirs(folderpath)
            except Exception as e:
                tr.err(e)
        # construct file path
        filepath = folderpath + "/" + slug + ".html"
        #~ write the file
        try:
            filex = open(filepath, "w")
            filex.write(html)
            filex.close()
        except Exception as e:
            tr.err(e)
def _write_file(self, slug, folderpath, html):
        # check directories

        if not os.path.isdir(folderpath):
            try:
                os.makedirs(folderpath)
            except Exception as e:
                tr.err(e)
        # construct file path
        filepath = folderpath + "/" + slug + ".html"
        #~ write the file
        try:
            filex = open(filepath, "w")
            filex.write(html)
            filex.close()
        except Exception as e:
            tr.err(e)
def _write_file ( self , slug , folderpath , html ) : # check directories if not os . path . isdir ( folderpath ) : try : os . makedirs ( folderpath ) except Exception as e : tr . err ( e ) # construct file path filepath = folderpath + "/" + slug + ".html" #~ write the file try : filex = open ( filepath , "w" ) filex . write ( html ) filex . close ( ) except Exception as e : tr . err ( e )
Writes a chart's html to a file
Writes a chart s html to a file