Fred Drake | 3a0351c | 1998-04-04 07:23:21 +0000 | [diff] [blame] | 1 | \section{Standard Module \module{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 | |
Fred Drake | bac354c | 1998-01-20 04:32:09 +0000 | [diff] [blame] | 5 | \strong{Please note:} The FORMS library, to which the |
| 6 | \code{fl}\refbimodindex{fl} module described above interfaces, is a |
| 7 | simpler and more accessible user interface library for use with GL |
| 8 | than the \code{panel} module (besides also being by a Dutch author). |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 9 | |
| 10 | This module should be used instead of the built-in module |
Fred Drake | bac354c | 1998-01-20 04:32:09 +0000 | [diff] [blame] | 11 | \code{pnl}\refbimodindex{pnl} |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 12 | to interface with the |
Fred Drake | af8a015 | 1998-01-14 14:51:31 +0000 | [diff] [blame] | 13 | \emph{Panel Library}. |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 14 | |
| 15 | The module is too large to document here in its entirety. |
| 16 | One interesting function: |
| 17 | |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 18 | \begin{funcdesc}{defpanellist}{filename} |
| 19 | Parses a panel description file containing S-expressions written by the |
Fred Drake | af8a015 | 1998-01-14 14:51:31 +0000 | [diff] [blame] | 20 | \emph{Panel Editor} |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 21 | that accompanies the Panel Library and creates the described panels. |
| 22 | It returns a list of panel objects. |
| 23 | \end{funcdesc} |
| 24 | |
| 25 | \strong{Warning:} |
| 26 | the Python interpreter will dump core if you don't create a GL window |
| 27 | before calling |
| 28 | \code{panel.mkpanel()} |
| 29 | or |
| 30 | \code{panel.defpanellist()}. |
| 31 | |
Fred Drake | 3a0351c | 1998-04-04 07:23:21 +0000 | [diff] [blame] | 32 | \section{Standard Module \module{panelparser}} |
Fred Drake | bac354c | 1998-01-20 04:32:09 +0000 | [diff] [blame] | 33 | \label{module-panelparser} |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 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 | |
Fred Drake | 3a0351c | 1998-04-04 07:23:21 +0000 | [diff] [blame] | 48 | \section{Built-in Module \module{pnl}} |
Fred Drake | bac354c | 1998-01-20 04:32:09 +0000 | [diff] [blame] | 49 | \label{module-pnl} |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 50 | \bimodindex{pnl} |
| 51 | |
| 52 | This module provides access to the |
Fred Drake | af8a015 | 1998-01-14 14:51:31 +0000 | [diff] [blame] | 53 | \emph{Panel Library} |
Fred Drake | bac354c | 1998-01-20 04:32:09 +0000 | [diff] [blame] | 54 | built by NASA Ames\index{NASA} (to get it, send e-mail to |
| 55 | \code{panel-request@nas.nasa.gov}). |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 56 | All access to it should be done through the standard module |
Fred Drake | bac354c | 1998-01-20 04:32:09 +0000 | [diff] [blame] | 57 | \code{panel}\refstmodindex{panel}, |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 58 | which transparantly exports most functions from |
| 59 | \code{pnl} |
| 60 | but redefines |
| 61 | \code{pnl.dopanel()}. |
| 62 | |
| 63 | \strong{Warning:} |
| 64 | the Python interpreter will dump core if you don't create a GL window |
| 65 | before calling |
| 66 | \code{pnl.mkpanel()}. |
| 67 | |
| 68 | The module is too large to document here in its entirety. |