Getting started with Pmw

Introduction

This document describes how to fetch and install Pmw, and how to run the demonstrations and tests.

Requirements

Pmw.0.8.3 requires the _tkinter and Tkinter modules. It works with python 1.5.2 and Tk 8.0.

If the BLT extension to Tk is present, Pmw will use the BLT busy command during modal dialogs to display a clock cursor. Also, the Pmw.Blt interface to the BLT busy, graph, stripchart, tabset and vector commands will be available. Only BLT version 2.4i is supported.

Distribution and installation

Releases of the Pmw distribution are available via ftp from ftp.dscpl.com.au. This release is available at pub/pmw/Pmw.0.8.3.tar.gz, released on 22 October 1999. This is a compressed tar file which can be unpacked like this:

gunzip Pmw.0.8.3.tar.gz
tar xvf Pmw.0.8.3.tar

This will unpack into a directory named Pmw. You now need to put this directory somewhere python can find it, preferably in one of the standard places, such as in the site-packages directory (eg: /usr/local/lib/python1.5/site-packages/Pmw) or the sys.prefix directory (eg: C:\Program Files\Python\Pmw).

If you do not have access to these standard directories, place the Pmw directory somewhere on your PYTHONPATH or sys.path. If this is not possible, place the Pmw directory somewhere else and add the parent directory to your PYTHONPATH or sys.path.

If you have previously installed Pmw version 0.6 or later, then the new version can share the same Pmw directory as the previous versions. You will need to perform the tar extraction in the directory containing (that is, the parent directory of) the existing Pmw directory. By default, your applications will use the most recent version of Pmw. If required, the function Pmw.setversion() can be used to specify a version to be used. See the reference manual for details. If you are no longer using the older versions, you can safely remove the corresponding subdirectories from the Pmw directory.

Documentation

The doc directory for each Pmw version contains all the documentation for that version of Pmw. See the local home page for a complete list of documents. The files in this directory are also available from the official Pmw home page.

Demonstrations and tests

A good way to get an overview of the functionality provided by Pmw is to run the demonstrations and tests and look at the demonstration code. To view a comprehensive demonstration of many of the features of Pmw run the All.py script, which can be found in the demos subdirectory of each version of Pmw.

You do not have to install Pmw to run the demonstrations and tests, simply change into the appropriate directory and run the file All.py. See Demonstrations and tests for more information about running the demonstrations and tests and how to create your own.

Contributions welcome

If you create some whiz-bang megawidgets and would like to contribute them to Pmw, they will be most welcome. You should be able to get some idea of the coding style used in Pmw code by reading How to build Pmw megawidgets and by looking at the Pmw library code itself in the lib directory of each Pmw version.

If you would like to contribute a megawidget, it would be preferable if it also came with a simple demonstration and a test script. See Demonstrations and tests for information about how to create new demonstrations and tests.

Each megawidget should also have a reference manual describing its options, components and methods. The released reference manuals are automatically generated by merging specially marked-up text with the output from megawidget query methods, such as components(), options() and componentaliases(), and various other introspective devices. If you would like to create documentation using this system, let me (gregm@iname.com) know and I will send it to you.

Future plans and bugs

The todo list contains a long list of of suggestions, bugs and enhancements for Pmw. If you are interested in doing any of these, please let me (gregm@iname.com) know. Some of the items in the todo list may be considered bugs. There are also some other problems due to idiosyncrasies in the implementation of Tk.

Acknowledgements

The initial ideas for Pmw were blatantly stolen from the itcl extensions [incr Tk] by Michael McLennan and [incr Widgets] by Mark Ulferts. Several of the megawidgets are direct translations from the itcl to python.

The base classes and most megawidgets were written by Greg McFarlane and Peter Munnings. Contributed megawidgets include: Pmw.TimeCounter by Joe VanAndel, Pmw.Group and an early version of Pmw.NoteBook by Case Roole, Pmw.ScrolledCanvas, Pmw.ScrolledFrame and another early version of Pmw.NoteBook by Joe Saltiel and Pmw.OptionMenu by Roman Sulzhyk. A big thank you to the following people for their bug reports, fixes, enhancements and suggestions: David Ascher, Robin Becker, Siggy Brentrup, Mark Colclough, Jerome Gay, Clemens Hintze, Rob Hooft Jack Jansen, Jonathan Kelly, Magnus Kessler, Matthias Klose, Andreas Kostyrka, Fredrik Lundh, Magnus Lycka, Graham Matthews, Dieter Maurer, Michael McLay, Daniel Michelson, Georg Mischler, Rob Pearson, Case Roole, Joe Saltiel, Roman Sulzhyk, Shen Wang, Chris Wright, and Guido van Rossum. Special thanks to Case Roole and Michael McLay for help with getting Pmw to work with python 1.5 packages and many other nifty features. My deepest apologies if I have forgotten anyone. Please let me know.

The Pmw home page and ftp site is made available courtesy of Dumpleton Software Consulting Pty Limited.

The current maintainer is Greg McFarlane. If you have any comments, enhancements or new contributions, please contact me at gregm@iname.com.

Home. Pmw 0.8.3 Maintainer gregm@iname.com. 22 Oct 1999