vpApp -- a GUI application framework using Motif

Guido.van.Rossum@cwi.nl
Mon, 25 Apr 1994 17:19:04 +0200

A colleague of mine has put together an impressive application
framework based on my Motif extensions. It can be ftp'ed from
ftp.cwi.nl:/pub/python/vpApp.tar.gz. Attached is the README file.
Complete PostScript documentation is included as the file
doc/Refman.ps.

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>

vpApp: a GUI application framework for (X)Python - version 0.1
==============================================================

vpApp (visual-programming application) is an application framework which
supports building GUI applications in Python. It requires a Python
interpreter with X support built in. Some of its characteristics are:

o Motif look and feel without the complexities of Motif
o uniform interface to both widget-based and non-widget-based classes
o callback mechanism supported by all classes
o generic application framework with built-in support for many standard dialogs
o support for "active attributes"
o model-view framework
o command classes supporting undo operation
o layout classes based on the "boxes and glue" model
o class browser application included

Inspiration and ideas have been taken from Smalltalk, Nextstep, MotifApp,
and Interviews. The following shows the "Hello world" program in vpApp:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import vp
from Application import Application
from Window import Window
from WidgetButton import PushButton

def CB( button ): vp.theQuitCommand.Execute()

def test():
app = Application('HelloApp')
win = Window()
win.AddWorkArea( PushButton({'name': 'Hello world!', 'callback': CB }))
app.Run()

test()
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Installation
------------

Using vpApp requires that you build and install an extended version of
Python, incorporating the X11 and Motif interface modules (written in
C). These modules are part of a collection of extensions to Python
that are distributed separately. Look for a gzipped tar-file named
extensions.tar.gz. Not all Python mirror sites carry this file; the
latest version is always available from Python's "home site",
ftp.cwi.nl, in directory pub/python.

Of course, you also need the core Python distribution. This is a
compressed (or gzipped) tar file called python<version>.tar.Z (or
.gz). You should be familiar with the Python build procedure before
trying to build an extended version of it. Make sure that you have an
extension kit that is compatible with the core distribution you have
(the README files will tell you which versions are compatible).

Once you have unpacked the extensions tar file, read the files
Extensions/README and Extensions/X11/README to find out how to build
the extended Python you need. In the X11 extension, you need to
include the following modules in the Setup file: Xt, Xlib, Xm.

By the way, you need to have Motif 1.1 (or 1.2) in order to build the
extended Python. I can't tell you how to get it -- if you don't have
it your site probably didn't pay for it.

Once you have built an extended Python, you should probably install it
as "xpython" (since the Motif interface is somewhat less stable than
the core modules, it is probably a good idea to keep the "standard"
Python binary for programs that don't need Motif). Install the Python
modules that come with the X11 extension (Extensions/X11/Lib)
somewhere; I suggest as /usr/local/lib/python/X11/.

Also install the vpApp modules somewhere -- I suggest as
/usr/local/lib/python/vpApp/.

Users of vpApp should set their environment variable PYTHONPATH to
contain the colon-separated pathnames of the X11 and the vpApp Python
modules. If these have been installed as suggested, the value of
PYTHONPATH could be the string
"/usr/local/lib/python/X11:/usr/local/lib/python/vpApp".

Documentation
-------------

A fairly elaborate reference manual (>130 pages) is provided in Postscript
form: $VPDIR/doc/Refman.ps.

Support & maintainance
----------------------

I will be leaving for another job shortly and will therefore probably not
be able to give any support or do any maintainance on vpApp.

Copyright Notice
----------------

The Python source is copyrighted, but you can freely use and copy it
as long as you don't change or remove the copyright:

Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.

All Rights Reserved

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.

STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Signature
---------

-Per Spilling, CWI, Amsterdam, <per@cwi.nl>