source: trunk/essentials/dev-lang/python/Tools/freeze/makeconfig.py@ 3298

Last change on this file since 3298 was 3225, checked in by bird, 19 years ago

Python 2.5

File size: 1.6 KB
Line 
1import re
2
3
4# Write the config.c file
5
6never = ['marshal', '__main__', '__builtin__', 'sys', 'exceptions']
7
8def makeconfig(infp, outfp, modules, with_ifdef=0):
9 m1 = re.compile('-- ADDMODULE MARKER 1 --')
10 m2 = re.compile('-- ADDMODULE MARKER 2 --')
11 while 1:
12 line = infp.readline()
13 if not line: break
14 outfp.write(line)
15 if m1 and m1.search(line):