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