Definition at line 55 of file keyword.py.
References dospath.join(), and aifc.open().
60 iptfile = args
and args[0]
or "Python/graminit.c"
61 if len(args) > 1: optfile = args[1]
62 else: optfile =
"Lib/keyword.py"
66 strprog = re.compile(
'"([^"]+)"')
71 if line.find(
'{1, "') > -1:
72 match = strprog.search(line)
74 lines.append(
" '" + match.group(1) +
"',\n")
80 format = fp.readlines()
85 start = format.index(
"#--start keywords--\n") + 1
86 end = format.index(
"#--end keywords--\n")
87 format[start:end] = lines
89 sys.stderr.write(
"target does not contain format markers\n")
93 fp =
open(optfile,
'w')
94 fp.write(
''.
join(format))