コード例 #1
0
ファイル: update_localization.py プロジェクト: wthnonck/tdtw
def load_languagefile(filename):
	f = open(filename, "rb")
	lines = f.readlines()
	f.close()
	
	stringtable = {}

	for i in _compatibility._xrange(0, len(lines)-1):
		l = lines[i].decode("utf-8").strip()
		if len(l) and not l[0] == '=' and not l[0] == '#':
			stringtable[l] = lines[i+1][2:].decode("utf-8").rstrip()
	
	return stringtable
コード例 #2
0
ファイル: content.py プロジェクト: wthnonck/tdtw
def FileList(format, num):
	return [format%(x+1) for x in _compatibility._xrange(0,num)]