summaryrefslogtreecommitdiffstats
path: root/scripts2/utils.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2015-09-08 15:34:08 +0800
committerPeng Wu <alexepico@gmail.com>2015-09-08 15:34:08 +0800
commitdff380f2847a030ae1e2db4c26c2316cf70fa7ca (patch)
tree85d36a7186a48302fb27306bb1fb7f758a43a52f /scripts2/utils.py
parent07d54709eaed625c3e30e50bf7e76826f132d446 (diff)
downloadlibpinyin-dff380f2847a030ae1e2db4c26c2316cf70fa7ca.tar.gz
libpinyin-dff380f2847a030ae1e2db4c26c2316cf70fa7ca.tar.xz
libpinyin-dff380f2847a030ae1e2db4c26c2316cf70fa7ca.zip
write generateheader.py
Diffstat (limited to 'scripts2/utils.py')
-rw-r--r--scripts2/utils.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/scripts2/utils.py b/scripts2/utils.py
index e33ed25..c90dd83 100644
--- a/scripts2/utils.py
+++ b/scripts2/utils.py
@@ -23,25 +23,6 @@
import os
-header = '''/* This file is generated by python scripts. Don't edit this file directly.
- */
-'''
-
-
-def expand_file(filename, get_table_content):
- infile = open(filename, "r")
- print(header)
- for line in infile.readlines():
- line = line.rstrip(os.linesep)
- if len(line) < 3:
- print(line)
- continue
- if line[0] == '@' and line[-1] == '@':
- tablename = line[1:-1]
- print(get_table_content(tablename))
- else:
- print(line)
-
def shuffle_all(instr):
for output in shuffle_recur(instr):