def write_languages(self, file_path='<STR_LIT>',date=str(datetime.date.today())):
self.remove_date(file_path=file_path, date=date)<EOL>languages_exists = os.path.isfile(file_path)<EOL>with open(file_path, '<STR_LIT:a>') as out_languages:<EOL><INDENT>if not languages_exists:<EOL><INDENT>out_languages.write('<STR_LIT>')<EOL><DEDENT>languages_sorted = sorted(self.languages_size)<EOL>for language in languages_sorted:<EOL><INDENT>try:<EOL><INDENT>out_languages.write(date + '<STR_LIT:U+002C>' + language + '<STR_LIT:U+002C>'<EOL>+ str(self.languages[language]) + '<STR_LIT:U+002C>'<EOL>+ str(self.languages_size[language]) + '<STR_LIT:U+002C>'<EOL>+ str(math.log10(int(self.languages_size[language])))<EOL>+ '<STR_LIT:\n>')<EOL><DEDENT>except (TypeError, KeyError) as e:<EOL><INDENT>out_languages.write(date + '<STR_LIT:U+002C>' + language + '<STR_LIT:U+002C>'<EOL>+ str(<NUM_LIT:0>) + '<STR_LIT:U+002C>'<EOL>+ str(self.languages_size[language]) + '<STR_LIT:U+002C>'<EOL>+ str(math.log10(int(self.languages_size[language])))<EOL>+ '<STR_LIT:\n>')<EOL><DEDENT><DEDENT><DEDENT>
Updates languages.csv file with current data.