From 083a9fb6a32b1750c0924baf8cee550d75da64c3 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 9 Nov 2011 09:25:18 +0800 Subject: refine python code --- scripts/genspecialtable.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'scripts/genspecialtable.py') diff --git a/scripts/genspecialtable.py b/scripts/genspecialtable.py index 9abe0e4..0ef9d44 100644 --- a/scripts/genspecialtable.py +++ b/scripts/genspecialtable.py @@ -83,15 +83,14 @@ def gen_resplit_table(): return ',\n'.join(entries) -### main function ### -if __name__ == "__main__": - load_phrase("pinyin2.txt") +#init code, load lists +divided_list = filter_divided() +resplit_list = filter_resplit() +sort_all() - #load lists - divided_list = filter_divided() - resplit_list = filter_resplit() - sort_all() +### main function ### +if __name__ == "__main__": s = gen_divided_table() + '\n' + gen_resplit_table() print(s) -- cgit