4 <meta name="description" content="Pmw - a toolkit for building high-level compound widgets in Python">
5 <meta name="content" content="python, megawidget, mega widget, compound widget, gui, tkinter">
6 <title>Getting started with Pmw</title>
9 <body bgcolor="#ffffff" text="#000000" link="#0000ee"
10 vlink="551a8b" alink="ff0000">
12 <h1 ALIGN="CENTER">Getting started with Pmw</h1>
14 <center><P ALIGN="CENTER">
15 <IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
19 <dt> <h2>Introduction</h2></dt><dd>
21 This document describes how to fetch and install Pmw, and how to run
22 the demonstrations and tests.
27 <dt> <h2>Requirements</h2></dt><dd>
29 Pmw.1.2 requires the _tkinter and Tkinter modules. It works
30 with python versions 1.5.2 and greater (tested up to 2.2.1) and Tk
31 versions 8.0 and greater (tested up to 8.3.2).
36 If the BLT extension to Tk is present, Pmw will use the BLT busy
37 command during modal dialogs to display a clock cursor. Also, the
38 Pmw.Blt interface to the BLT busy, graph, stripchart, tabset and
39 vector commands will be available. BLT versions 2.4i and greater are
40 supported (tested up to 2.4u). You can find BLT at
41 <a href="http://www.tcltk.com/blt/">http://www.tcltk.com/blt/</a>.
46 <dt> <h2>Distribution and installation</h2></dt><dd>
48 Releases of the Pmw distribution are available via http from
49 <code>http://download.sourceforge.net/pmw/</code>. This release is available
50 as <a href="http://download.sourceforge.net/pmw/Pmw.1.2.tar.gz">
51 <code>Pmw.1.2.tar.gz</code></a>, released on 5 August 2003.
52 This is a compressed tar file. Under Linux, Unix, etc, you will need to
53 unpack it using <code>tar</code> and you may also need to use
54 <code>gzip</code> or <code>gunzip</code> to uncompress it.
55 Under Microsoft Windows, you will need a program such as WinZip (<a
56 href="http://www.winzip.com">http://www.winzip.com</a>) that can
57 unpack the gzipped tar files. You may need to change the suffix of
58 the file to <strong>.tgz</strong> for WinZip to recognise it.
64 This will unpack into a directory named Pmw. You now need to put this
65 directory somewhere python can find it, preferably in one of the
66 standard places, such as in the <code>site-packages</code> directory
67 (eg: <code>/usr/lib/python2.2/site-packages/Pmw</code>) or the
68 <code>sys.prefix</code> directory (eg: <code>C:\Program
69 Files\Python\Pmw</code> or <code>/usr/lib/python2.2</code>).
75 For example, under Unix, assuming you have placed the tar file in the
76 <code>/tmp</code> directory, you can simply run the following
84 cd /usr/lib/python2.2/site-packages
85 gunzip /tmp/Pmw.1.2.tar.gz (or gzip -d /tmp/Pmw.1.2.tar.gz)
86 tar xvf /tmp/Pmw.1.2.tar
93 If you do not have write permission for these standard directories,
95 directory somewhere on your <code>PYTHONPATH</code> or
96 <code>sys.path</code>. If this is not possible, place the Pmw
97 directory somewhere else and add the parent directory to your
98 <code>PYTHONPATH</code> or <code>sys.path</code>.
104 If you have previously installed Pmw version 0.6 or later, then the
105 new version can share the same <code>Pmw</code> directory as the
106 previous versions. You will need to perform the <code>tar</code>
107 extraction in the directory containing (that is, the parent directory
108 of) the existing <code>Pmw</code> directory. By default, your
109 applications will use the most recent version of Pmw. If required,
110 the function <code>Pmw.setversion()</code> can be used to specify a
111 version to be used. See the reference manual for details. If you are
112 no longer using the older versions, you can safely remove the
113 corresponding subdirectories from the <code>Pmw</code> directory.
119 If you need assistance in installing BLT under Unix, please contact me
120 (<a href="mailto:gregm@iname.com"><i>gregm@iname.com</i></a>) and I
121 will try to help. For other operating systems, such as Microsoft or
122 Macintosh, you should try asking the python newsgroup. If anyone can
123 give me a description of how to install BLT under other operating
124 systems please contribute it and I will place it here.
129 <dt> <h2>Documentation</h2></dt><dd>
131 The <code>doc</code> directory for each Pmw version contains all the
132 documentation for that version of Pmw. See the local <a
133 href="index.html">home page</a> for a complete list of documents. The
134 files in this directory are also available from the <a
135 href="http://pmw.sourceforge.net/">official Pmw home page</a>.
140 An excellent tutorial and reference covering the Pmw interface to the
141 powerful Blt graph widget, "<a
142 href="http://www.ifi.uio.no/~hpl/Pmw.Blt/doc/">A User's Guide to
143 Pmw.Blt</a>" written by Bjørn Ove Thue and Hans Petter Langtangen, is
144 available. You can also download <a
145 href="http://www.ifi.uio.no/~hpl/Pmw.Blt/Pmw.Blt.doc.tar.gz">the full
146 HTML document</a> for local viewing.
150 <dt> <h2>Demonstrations and tests</h2></dt><dd>
152 A good way to get an overview of the functionality provided by Pmw
153 is to run the demonstrations and tests and look at the demonstration
154 code. To view a comprehensive demonstration of many of the features
155 of Pmw run the <code>All.py</code> script, which can be found in the
156 <code>demos</code> subdirectory of each version of Pmw.
161 You do not have to install Pmw to run the demonstrations and tests,
162 simply change into the appropriate directory and run the file
163 <code>All.py</code>. See <a
164 href="demosandtests.html">Demonstrations and tests</a> for more
165 information about running the demonstrations and tests and how to
171 Note that there are some bugs in later versions of BLT (at least 2.4t
172 and 2.4u) which cause some tests of Pmw.Blt.Graph to crash with
173 python2.0 under Linux. These tests have been commented out (until BLT
176 <a name=contributions></a>
178 <dt> <h2>Contributions welcome</h2></dt><dd>
181 If you create some whiz-bang megawidgets and would like to contribute
182 them to Pmw, they will be most welcome. You should be able to get
183 some idea of the coding style used in Pmw code by reading <a
184 href="howtobuild.html">How to build Pmw megawidgets</a> and by looking
185 at the Pmw library code itself in the <code>lib</code> directory of
191 If you would like to contribute a megawidget, it would be preferable if it
192 also came with a simple demonstration and a test script. See <a
193 href="demosandtests.html">Demonstrations and tests</a> for information
194 about how to create new demonstrations and tests.
198 Each megawidget should also have a reference manual describing its
199 options, components and methods.
205 <dt> <h2>Generating the documentation</h2></dt><dd>
208 The released reference manuals are
209 automatically generated by merging specially marked-up text with the
210 output from megawidget query methods, such as
211 <code>components()</code>, <code>options()</code> and
212 <code>componentaliases()</code>, and various other introspective
213 devices. If you are interested to see how the documentation is generated,
214 you can fetch the marked-up text and the python script to convert the
216 <a href="http://download.sourceforge.net/pmw/Pmw.1.2.docsrc.tar.gz">
217 <code>http://download.sourceforge.net/pmw/Pmw.1.2.docsrc.tar.gz</code>
219 file into the <code>Pmw/Pmw_1_2</code> directory of the Pmw source
220 tree. Unzip and untar the file. This will create a
221 <code>docsrc</code> sub-directory of <code>Pmw/Pmw_1_2</code>. If
222 you want to keep the documentation which came with the Pmw
223 distribution, rename the old <code>doc</code> directory. Then change
224 directory to <code>docsrc</code> and run <code>createmanuals.py</code>.
225 After printing lots of warnings about documentation that has not been
226 written yet, this will create a new <code>doc</code> directory
227 containing all the html documentation.
231 Here is an example set of commands to unpack the documentation source
232 and regenerate the documentation, assuming you have downloaded the
233 source in the Pmw/Pmw_1_2 directory:
240 gunzip Pmw.1.2.docsrc.tar.gz
241 tar xvf Pmw.1.2.docsrc.tar
250 If running under Unix, you will need to run the
251 <code>createmanuals.py</code> script with a valid DISPLAY environment
252 variable, since it creates each megawidget and then queries it for its
253 options, components, etc. This is because Tk (and hence Tkinter)
254 requires a connection to an X server to run.
259 <dt> <h2>Future plans and bugs</h2></dt><dd>
262 The <a href="todo.html">todo list</a> contains a long list of of
263 suggestions, bugs and enhancements for Pmw. If you are interested in
264 doing any of these, please let the maintainer
265 (<a href="mailto:gregm@iname.com"><i>gregm@iname.com</i></a>) know.
266 Some of the items in the todo list may be considered bugs. There are
267 also some other problems due to idiosyncrasies in the implementation
273 <dt> <h2>Licence</h2></dt><dd>
276 The official Pmw licence (see <a href="copyright.html">copyright</a>)
277 basically lets you do anything with Pmw as long as you don't hurt anyone.
278 There is also another licence, the "Postcard Licence":
281 "I'd like to get a postcard from you! I'm interested in who is using
282 Pmw, where you live and where in the world Pmw is doing it's job"
285 Please send me an e-mail to
286 <a href="mailto:gregm@iname.com"><i>gregm@iname.com</i></a>
287 to get my postal address.
291 <dt> <h2>Acknowledgements</h2></dt><dd>
294 The initial ideas for Pmw were blatantly stolen from the itcl
296 <a href="http://www.tcltk.com/itk">[incr Tk]</a>
297 by Michael McLennan and
298 <a href="http://www.tcltk.com/iwidgets">[incr Widgets]</a>
299 by Mark Ulferts. Several of the megawidgets are direct translations
300 from the itcl to python.
304 The base classes and most megawidgets were written by Greg McFarlane
305 and Peter Munnings. Contributed megawidgets include: Pmw.TimeCounter
306 by Joe VanAndel, Pmw.Group and an early version of Pmw.NoteBook by Case Roole,
307 Pmw.ScrolledCanvas, Pmw.ScrolledFrame and another early version of
308 Pmw.NoteBook by Joe Saltiel
309 and Pmw.OptionMenu by Roman Sulzhyk. A big thank you to the following
310 people for their bug reports, fixes, enhancements and suggestions:
340 Special thanks to Case Roole and Michael McLay for help with getting
341 Pmw to work with python packages and many other nifty features.
343 My deepest apologies if I have forgotten anyone. Please let me know.
348 The Pmw home page and project site is made available courtesy of
349 <a href="http://sourceforge.net">SourceForge</a>.
354 The current maintainer is Greg McFarlane. I monitor the <a
355 href="http://lists.sourceforge.net/lists/listinfo/pmw-general">Pmw
356 discussion and announcement mailing list</a> so please send any
357 problems, comments, suggestions or enhancements to the list. You may
358 also contact me directly at <a
359 href="mailto:gregm@iname.com"><i>gregm@iname.com</i></a>.
366 <center><P ALIGN="CENTER">
367 <IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
372 <center><P ALIGN="CENTER">
375 - <a href="index.html">Home</a>