source:
trunk/essentials/dev-lang/python/Tools/freeze/makeconfig.py@
3298
| Last change on this file since 3298 was 3225, checked in by , 19 years ago | |
|---|---|
| File size: 1.6 KB | |
| Line | |
|---|---|
| 1 | import re |
| 2 | |
| 3 | |
| 4 | # Write the config.c file |
| 5 | |
| 6 | never = ['marshal', '__main__', '__builtin__', 'sys', 'exceptions'] |
| 7 | |
| 8 | def 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): |
