blob: 4c1e9f4ec8019e03889f93352d25df82f64c9bb3 [file] [log] [blame]
Guido van Rossumbcf08541995-02-05 16:52:24 +00001BGEN -- An Experiment: Automatic Generation of Extension Modules
2================================================================
3
4This directory contains BGEN -- a package that helps in generating
5complete source code for Python extension module. It currently also
6contains a set of examples that were generated with BGEN. These
7examples are mostly interfaces to a number of important managers in
8the Macintosh toolbox.
9
10
11Overview of Subdirectories
12--------------------------
13
14Main subdirectories:
15
16bgen the code generator package
17
18Example subdirectories:
19
20ae AppleEvents
21ctl Controls
22dlg Dialogs
23evt Events
24menu Menus
25qd QuickDraw
26res Resources
27snd Sound
28win Windows
29
30
31Contents of Subdirectories
32--------------------------
33
34The contents of each example subdirectory is similar (<Foobar> is
35for instance AppleEvents, while <foo> is ae):
36
37<foo>scan.py Scan the <Foobar>.h header, generating <foo>gen.py
38<foo>gen.py Output of <foo>scan.py, input for <foo>support.py
39<foo>edit.py Manually written complement of <foo>gen.py, sometimes
40<foo>support.py Generate <Foo>module.c from <foo>gen.py and <foo>edit.py
41<Foo>module.c The interface module, ready to be compiled
42<Foobar>.py Symbolic constants extracted from <Foobar.h>
43
44
45Tests and Examples
46------------------
47
48Other files in these subdirectories are usually examples using the
49extension. If there's a file t<foo>.py, it usually is a really
50boring test program.
51
52Some test programs contain pathnames that should be edited before
53trying them.
54
55Some of the less boring tests and examples:
56
57At the top level:
58
59test.py Application mainloop, uses most Mac extensions
60
61In ae:
62
63aetools.py Conversions between AE and Python data type
64echo.py Dummy AE server, echoes all data back
65tell.py Primitive AE client
66aete.py Decode 'aete' and 'aeut' resources (incomplete)
67
68In res:
69
70listres.py List *all* resources in current and in all res files
71copyres.py Copy a resource file
72mkerrstrres.py Read "errors.txt" and create a set of "Estr" resources
73
74In snd:
75
76playaiff.py Play an AIFF file
77morse.py Turn text into Morse code
78audiodev.py The standard audiodev.py extended with Mac support
79Audio_mac.py The Mac support for audiodev.py