1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382
|
<html>
<head>
<meta name="description" content="Pmw - a toolkit for building high-level compound widgets in Python">
<meta name="content" content="python, megawidget, mega widget, compound widget, gui, tkinter">
<title>Getting started with Pmw</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#0000ee"
vlink="551a8b" alink="ff0000">
<h1 ALIGN="CENTER">Getting started with Pmw</h1>
<center><P ALIGN="CENTER">
<IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
</p></center>
<dl>
<dt> <h2>Introduction</h2></dt><dd>
<p>
This document describes how to fetch and install Pmw, and how to run
the demonstrations and tests.
</p>
</dd>
<dt> <h2>Requirements</h2></dt><dd>
<p>
Pmw.1.2 requires the _tkinter and Tkinter modules. It works
with python versions 1.5.2 and greater (tested up to 2.2.1) and Tk
versions 8.0 and greater (tested up to 8.3.2).
</p>
<p>
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. BLT versions 2.4i and greater are
supported (tested up to 2.4u). You can find BLT at
<a href="http://www.tcltk.com/blt/">http://www.tcltk.com/blt/</a>.
</p>
</dd>
<dt> <h2>Distribution and installation</h2></dt><dd>
<p>
Releases of the Pmw distribution are available via http from
<code>http://download.sourceforge.net/pmw/</code>. This release is available
as <a href="http://download.sourceforge.net/pmw/Pmw.1.2.tar.gz">
<code>Pmw.1.2.tar.gz</code></a>, released on 5 August 2003.
This is a compressed tar file. Under Linux, Unix, etc, you will need to
unpack it using <code>tar</code> and you may also need to use
<code>gzip</code> or <code>gunzip</code> to uncompress it.
Under Microsoft Windows, you will need a program such as WinZip (<a
href="http://www.winzip.com">http://www.winzip.com</a>) that can
unpack the gzipped tar files. You may need to change the suffix of
the file to <strong>.tgz</strong> for WinZip to recognise it.
</p>
<p>
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 <code>site-packages</code> directory
(eg: <code>/usr/lib/python2.2/site-packages/Pmw</code>) or the
<code>sys.prefix</code> directory (eg: <code>C:\Program
Files\Python\Pmw</code> or <code>/usr/lib/python2.2</code>).
</p>
<p>
For example, under Unix, assuming you have placed the tar file in the
<code>/tmp</code> directory, you can simply run the following
commands:
</p>
<dl>
<dd>
<pre>
cd /usr/lib/python2.2/site-packages
gunzip /tmp/Pmw.1.2.tar.gz (or gzip -d /tmp/Pmw.1.2.tar.gz)
tar xvf /tmp/Pmw.1.2.tar
</pre>
</dd>
</dl>
<p>
If you do not have write permission for these standard directories,
place the Pmw
directory somewhere on your <code>PYTHONPATH</code> or
<code>sys.path</code>. If this is not possible, place the Pmw
directory somewhere else and add the parent directory to your
<code>PYTHONPATH</code> or <code>sys.path</code>.
</p>
<p>
If you have previously installed Pmw version 0.6 or later, then the
new version can share the same <code>Pmw</code> directory as the
previous versions. You will need to perform the <code>tar</code>
extraction in the directory containing (that is, the parent directory
of) the existing <code>Pmw</code> directory. By default, your
applications will use the most recent version of Pmw. If required,
the function <code>Pmw.setversion()</code> 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 <code>Pmw</code> directory.
</p>
<p>
If you need assistance in installing BLT under Unix, please contact me
(<a href="mailto:gregm@iname.com"><i>gregm@iname.com</i></a>) and I
will try to help. For other operating systems, such as Microsoft or
Macintosh, you should try asking the python newsgroup. If anyone can
give me a description of how to install BLT under other operating
systems please contribute it and I will place it here.
</p>
</dd>
<dt> <h2>Documentation</h2></dt><dd>
<p>
The <code>doc</code> directory for each Pmw version contains all the
documentation for that version of Pmw. See the local <a
href="index.html">home page</a> for a complete list of documents. The
files in this directory are also available from the <a
href="http://pmw.sourceforge.net/">official Pmw home page</a>.
</p>
<p>
An excellent tutorial and reference covering the Pmw interface to the
powerful Blt graph widget, "<a
href="http://www.ifi.uio.no/~hpl/Pmw.Blt/doc/">A User's Guide to
Pmw.Blt</a>" written by Bjrn Ove Thue and Hans Petter Langtangen, is
available. You can also download <a
href="http://www.ifi.uio.no/~hpl/Pmw.Blt/Pmw.Blt.doc.tar.gz">the full
HTML document</a> for local viewing.
</p>
</dd>
<dt> <h2>Demonstrations and tests</h2></dt><dd>
<p>
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 <code>All.py</code> script, which can be found in the
<code>demos</code> subdirectory of each version of Pmw.
</p>
<p>
You do not have to install Pmw to run the demonstrations and tests,
simply change into the appropriate directory and run the file
<code>All.py</code>. See <a
href="demosandtests.html">Demonstrations and tests</a> for more
information about running the demonstrations and tests and how to
create your own.
</p>
<p>
Note that there are some bugs in later versions of BLT (at least 2.4t
and 2.4u) which cause some tests of Pmw.Blt.Graph to crash with
python2.0 under Linux. These tests have been commented out (until BLT
is fixed).
<a name=contributions></a>
</dd>
<dt> <h2>Contributions welcome</h2></dt><dd>
<p>
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 <a
href="howtobuild.html">How to build Pmw megawidgets</a> and by looking
at the Pmw library code itself in the <code>lib</code> directory of
each Pmw version.
</p>
<p>
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 <a
href="demosandtests.html">Demonstrations and tests</a> for information
about how to create new demonstrations and tests.
</p>
<p>
Each megawidget should also have a reference manual describing its
options, components and methods.
</p>
<a name=docgen></a>
</dd>
<dt> <h2>Generating the documentation</h2></dt><dd>
<p>
The released reference manuals are
automatically generated by merging specially marked-up text with the
output from megawidget query methods, such as
<code>components()</code>, <code>options()</code> and
<code>componentaliases()</code>, and various other introspective
devices. If you are interested to see how the documentation is generated,
you can fetch the marked-up text and the python script to convert the
text to html from
<a href="http://download.sourceforge.net/pmw/Pmw.1.2.docsrc.tar.gz">
<code>http://download.sourceforge.net/pmw/Pmw.1.2.docsrc.tar.gz</code>
</a>. Download this
file into the <code>Pmw/Pmw_1_2</code> directory of the Pmw source
tree. Unzip and untar the file. This will create a
<code>docsrc</code> sub-directory of <code>Pmw/Pmw_1_2</code>. If
you want to keep the documentation which came with the Pmw
distribution, rename the old <code>doc</code> directory. Then change
directory to <code>docsrc</code> and run <code>createmanuals.py</code>.
After printing lots of warnings about documentation that has not been
written yet, this will create a new <code>doc</code> directory
containing all the html documentation.
</p>
<p>
Here is an example set of commands to unpack the documentation source
and regenerate the documentation, assuming you have downloaded the
source in the Pmw/Pmw_1_2 directory:
</p>
<dl>
<dd>
<pre>
cd Pmw/Pmw_1_2
gunzip Pmw.1.2.docsrc.tar.gz
tar xvf Pmw.1.2.docsrc.tar
mv doc doc.old
cd docsrc
./createmanuals.py
</pre>
</dd>
</dl>
<p>
If running under Unix, you will need to run the
<code>createmanuals.py</code> script with a valid DISPLAY environment
variable, since it creates each megawidget and then queries it for its
options, components, etc. This is because Tk (and hence Tkinter)
requires a connection to an X server to run.
</p>
</dd>
<dt> <h2>Future plans and bugs</h2></dt><dd>
<p>
The <a href="todo.html">todo list</a> contains a long list of of
suggestions, bugs and enhancements for Pmw. If you are interested in
doing any of these, please let the maintainer
(<a href="mailto:gregm@iname.com"><i>gregm@iname.com</i></a>) 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.
</p>
</dd>
<dt> <h2>Licence</h2></dt><dd>
<p>
The official Pmw licence (see <a href="copyright.html">copyright</a>)
basically lets you do anything with Pmw as long as you don't hurt anyone.
There is also another licence, the "Postcard Licence":
</p>
<cite>
"I'd like to get a postcard from you! I'm interested in who is using
Pmw, where you live and where in the world Pmw is doing it's job"
</cite>
<p>
Please send me an e-mail to
<a href="mailto:gregm@iname.com"><i>gregm@iname.com</i></a>
to get my postal address.
</p>
</dd>
<dt> <h2>Acknowledgements</h2></dt><dd>
<p>
The initial ideas for Pmw were blatantly stolen from the itcl
extensions
<a href="http://www.tcltk.com/itk">[incr Tk]</a>
by Michael McLennan and
<a href="http://www.tcltk.com/iwidgets">[incr Widgets]</a>
by Mark Ulferts. Several of the megawidgets are direct translations
from the itcl to python.
</p>
<p>
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 packages and many other nifty features.
My deepest apologies if I have forgotten anyone. Please let me know.
</p>
<p>
The Pmw home page and project site is made available courtesy of
<a href="http://sourceforge.net">SourceForge</a>.
</p>
<p>
The current maintainer is Greg McFarlane. I monitor the <a
href="http://lists.sourceforge.net/lists/listinfo/pmw-general">Pmw
discussion and announcement mailing list</a> so please send any
problems, comments, suggestions or enhancements to the list. You may
also contact me directly at <a
href="mailto:gregm@iname.com"><i>gregm@iname.com</i></a>.
</p>
</dd>
</dl>
<center><P ALIGN="CENTER">
<IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
</p></center>
<font size=-1>
<center><P ALIGN="CENTER">
Pmw 1.2 -
5 Aug 2003
- <a href="index.html">Home</a>
</p></center>
</font>
</body>
</html>
|