libpanel.tex 2.2 KB
Newer Older
Fred Drake's avatar
Fred Drake committed
1 2
\section{\module{panel} ---
         None}
3 4 5 6
\declaremodule{standard}{panel}

\modulesynopsis{None}

7

8 9 10 11
\strong{Please note:} The FORMS library, to which the
\code{fl}\refbimodindex{fl} module described above interfaces, is a
simpler and more accessible user interface library for use with GL
than the \code{panel} module (besides also being by a Dutch author).
12 13

This module should be used instead of the built-in module
14
\code{pnl}\refbimodindex{pnl}
15
to interface with the
16
\emph{Panel Library}.
17 18 19 20 21 22

The module is too large to document here in its entirety.
One interesting function:

\begin{funcdesc}{defpanellist}{filename}
Parses a panel description file containing S-expressions written by the
23
\emph{Panel Editor}
24 25 26 27
that accompanies the Panel Library and creates the described panels.
It returns a list of panel objects.
\end{funcdesc}

28 29
\warning{The Python interpreter will dump core if you don't create a
GL window before calling
30 31
\code{panel.mkpanel()}
or
32
\code{panel.defpanellist()}.}
33

Fred Drake's avatar
Fred Drake committed
34 35
\section{\module{panelparser} ---
         None}
36 37 38 39
\declaremodule{standard}{panelparser}

\modulesynopsis{None}

40 41 42 43 44 45 46 47 48 49 50 51 52

This module defines a self-contained parser for S-expressions as output
by the Panel Editor (which is written in Scheme so it can't help writing
S-expressions).
The relevant function is
\code{panelparser.parse_file(\var{file})}
which has a file object (not a filename!) as argument and returns a list
of parsed S-expressions.
Each S-expression is converted into a Python list, with atoms converted
to Python strings and sub-expressions (recursively) to Python lists.
For more details, read the module file.
% XXXXJH should be funcdesc, I think

Fred Drake's avatar
Fred Drake committed
53 54
\section{\module{pnl} ---
         None}
55 56 57 58
\declaremodule{builtin}{pnl}

\modulesynopsis{None}

59 60

This module provides access to the
61
\emph{Panel Library}
62
built by NASA Ames\index{NASA} (to get it, send email to
63
\code{panel-request@nas.nasa.gov}).
64
All access to it should be done through the standard module
65
\code{panel}\refstmodindex{panel},
66
which transparently exports most functions from
67 68 69 70
\code{pnl}
but redefines
\code{pnl.dopanel()}.

71 72
\warning{The Python interpreter will dump core if you don't create a
GL window before calling \code{pnl.mkpanel()}.}
73 74

The module is too large to document here in its entirety.