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