#changed all email address to go through python.org
[python/dscho.git] / Tools / bgen / README
blob4c1e9f4ec8019e03889f93352d25df82f64c9bb3
1 BGEN -- An Experiment: Automatic Generation of Extension Modules
2 ================================================================
4 This directory contains BGEN -- a package that helps in generating
5 complete source code for Python extension module.  It currently also
6 contains a set of examples that were generated with BGEN.  These
7 examples are mostly interfaces to a number of important managers in
8 the Macintosh toolbox.
11 Overview of Subdirectories
12 --------------------------
14 Main subdirectories:
16 bgen    the code generator package
18 Example subdirectories:
20 ae      AppleEvents
21 ctl     Controls
22 dlg     Dialogs
23 evt     Events
24 menu    Menus
25 qd      QuickDraw
26 res     Resources
27 snd     Sound
28 win     Windows
31 Contents of Subdirectories
32 --------------------------
34 The contents of each example subdirectory is similar (<Foobar> is
35 for instance AppleEvents, while <foo> is ae):
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>
45 Tests and Examples
46 ------------------
48 Other files in these subdirectories are usually examples using the
49 extension.  If there's a file t<foo>.py, it usually is a really
50 boring test program.
52 Some test programs contain pathnames that should be edited before
53 trying them.
55 Some of the less boring tests and examples:
57 At the top level:
59 test.py         Application mainloop, uses most Mac extensions
61 In ae:
63 aetools.py      Conversions between AE and Python data type
64 echo.py         Dummy AE server, echoes all data back
65 tell.py         Primitive AE client
66 aete.py         Decode 'aete' and 'aeut' resources (incomplete)
68 In res:
70 listres.py      List *all* resources in current and in all res files
71 copyres.py      Copy a resource file
72 mkerrstrres.py  Read "errors.txt" and create a set of "Estr" resources
74 In snd:
76 playaiff.py     Play an AIFF file
77 morse.py        Turn text into Morse code
78 audiodev.py     The standard audiodev.py extended with Mac support
79 Audio_mac.py    The Mac support for audiodev.py