source: trunk/essentials/dev-lang/python/Mac/Modules/res/resscan.py

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

Python 2.5

File size: 2.7 KB
Line 
1# Scan Resources.h header file, generate resgen.py and Resources.py files.
2# Then run ressupport to generate Resmodule.c.
3# (Should learn how to tell the compiler to compile it as well.)
4
5import sys
6import os
7import string
8import MacOS
9
10from bgenlocations import TOOLBOXDIR, BGENDIR
11sys.path.append(BGENDIR)
12
13from scantools import Scanner
14
15def main():
16 input = "Resources.h"
17 output = "resgen.py"
18 defsoutput = TOOLBOXDIR + "Resources.py"
19 scanner = ResourcesScanner(input, output, defsoutput)
20 scanner.scan()
21 scanner.close()
22 print "=== Testing definitions output code ==="