summaryrefslogtreecommitdiffstats
path: root/scripts/utils.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-12-15 11:06:08 +0800
committerPeng Wu <alexepico@gmail.com>2011-12-15 11:06:08 +0800
commitb76cdb25c9f724cd93c5555ac0e967a148d455dc (patch)
tree394391c63c9f1ca4b87ae09d3dd2ab0567e3816d /scripts/utils.py
parent8f6d32826c67dde615157aba21dbfdcdf4d479c7 (diff)
downloadlibpinyin-b76cdb25c9f724cd93c5555ac0e967a148d455dc.tar.gz
libpinyin-b76cdb25c9f724cd93c5555ac0e967a148d455dc.tar.xz
libpinyin-b76cdb25c9f724cd93c5555ac0e967a148d455dc.zip
refine python code
Diffstat (limited to 'scripts/utils.py')
-rw-r--r--scripts/utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/utils.py b/scripts/utils.py
index 77eecbe..391e54f 100644
--- a/scripts/utils.py
+++ b/scripts/utils.py
@@ -22,8 +22,13 @@
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 :