#!/usr/bin/env python """ Parse the Unicode.org iso15924-utf8-20070715.txt file and create an XML file for our own use. iso15924-parse.py version 0.1 Copyright (C) 2005 Alastair McKinstry Copyright (C) 2007 Ivan Masar Released under the GNU License; see file COPYING for details """ f=open("iso15924-utf8-20070715.txt") ot=open("iso_15924.xml","w") ot.write(""" ]> """) for i in range(1, 7): f.readline() # throw away the header for li in f.readlines(): (code,num,eng,fra,pva,date) = li.split(';') eng = eng.strip() ot.write('\t\n' % eng) ot.write('') ot.close() f.close()