blob: b82bf98bfeb7cbfee9323c8a599898900b12572f [file] [log] [blame]
Guido van Rossum5fdeeea1994-01-02 01:22:07 +00001\section{Standard Module \sectcode{panel}}
2\stmodindex{panel}
3
4\strong{Please note:} The FORMS library, to which the \code{fl} module described
5above interfaces, is a simpler and more accessible user interface
6library for use with GL than the Panel Module (besides also being by a
7Dutch author).
8
9This module should be used instead of the built-in module
10\code{pnl}
11to interface with the
12{\em Panel Library}.
13
14The module is too large to document here in its entirety.
15One interesting function:
16
17\renewcommand{\indexsubitem}{(in module panel)}
18\begin{funcdesc}{defpanellist}{filename}
19Parses a panel description file containing S-expressions written by the
20{\em Panel Editor}
21that accompanies the Panel Library and creates the described panels.
22It returns a list of panel objects.
23\end{funcdesc}
24
25\strong{Warning:}
26the Python interpreter will dump core if you don't create a GL window
27before calling
28\code{panel.mkpanel()}
29or
30\code{panel.defpanellist()}.
31
32\section{Standard Module \sectcode{panelparser}}
33\stmodindex{panelparser}
34
35This module defines a self-contained parser for S-expressions as output
36by the Panel Editor (which is written in Scheme so it can't help writing
37S-expressions).
38The relevant function is
39\code{panelparser.parse_file(\var{file})}
40which has a file object (not a filename!) as argument and returns a list
41of parsed S-expressions.
42Each S-expression is converted into a Python list, with atoms converted
43to Python strings and sub-expressions (recursively) to Python lists.
44For more details, read the module file.
45% XXXXJH should be funcdesc, I think
46
47\section{Built-in Module \sectcode{pnl}}
48\bimodindex{pnl}
49
50This module provides access to the
51{\em Panel Library}
52built by NASA Ames (to get it, send e-mail to
53{\tt panel-request@nas.nasa.gov}).
54All access to it should be done through the standard module
55\code{panel},
56which transparantly exports most functions from
57\code{pnl}
58but redefines
59\code{pnl.dopanel()}.
60
61\strong{Warning:}
62the Python interpreter will dump core if you don't create a GL window
63before calling
64\code{pnl.mkpanel()}.
65
66The module is too large to document here in its entirety.