Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / lib / python2.4 / site-packages / Pmw / Pmw_1_2 / doc / starting.html
<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 Bjørn 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>