]> SALOME platform Git repositories - tools/eficas.git/blob - Pmw/Pmw_1_2/doc/starting.html
Salome HOME
Modif V6_4_°
[tools/eficas.git] / Pmw / Pmw_1_2 / doc / starting.html
1
2     <html>
3     <head>
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>
7     </head>
8
9     <body bgcolor="#ffffff" text="#000000" link="#0000ee"
10         vlink="551a8b" alink="ff0000">
11
12     <h1 ALIGN="CENTER">Getting started with Pmw</h1>
13     
14 <center><P ALIGN="CENTER">
15 <IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
16 </p></center>
17
18 <dl>
19 <dt> <h2>Introduction</h2></dt><dd>
20 <p>
21 This document describes how to fetch and install Pmw, and how to run
22 the demonstrations and tests.
23
24 </p>
25
26 </dd>
27 <dt> <h2>Requirements</h2></dt><dd>
28 <p>
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).
32
33 </p>
34
35 <p>
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>.
42
43 </p>
44
45 </dd>
46 <dt> <h2>Distribution and installation</h2></dt><dd>
47 <p>
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.
59
60 </p>
61
62 <p>
63
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>).
70
71 </p>
72
73 <p>
74
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
77 commands:
78
79 </p>
80
81 <dl>
82 <dd>
83 <pre>
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
87 </pre>
88 </dd>
89 </dl>
90
91 <p>
92
93 If you do not have write permission for these standard directories,
94 place the Pmw
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>.
99
100 </p>
101
102 <p>
103
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.
114
115 </p>
116
117 <p>
118
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.
125
126 </p>
127
128 </dd>
129 <dt> <h2>Documentation</h2></dt><dd>
130 <p>
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>.
136
137 </p>
138
139 <p>
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.
147
148 </p>
149 </dd>
150 <dt> <h2>Demonstrations and tests</h2></dt><dd>
151 <p>
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.
157 </p>
158
159 <p>
160
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
166   create your own.
167 </p>
168
169 <p>
170
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
174 is fixed).
175
176 <a name=contributions></a>
177 </dd>
178 <dt> <h2>Contributions welcome</h2></dt><dd>
179
180 <p>
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
186 each Pmw version.
187
188 </p>
189
190 <p>
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.
195 </p>
196
197 <p>
198 Each megawidget should also have a reference manual describing its
199 options, components and methods.
200
201 </p>
202
203 <a name=docgen></a>
204 </dd>
205 <dt> <h2>Generating the documentation</h2></dt><dd>
206
207 <p>
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
215 text to html from
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>
218 </a>.  Download this
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.
228 </p>
229
230 <p>
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:
234 </p>
235
236 <dl>
237 <dd>
238 <pre>
239 cd Pmw/Pmw_1_2
240 gunzip Pmw.1.2.docsrc.tar.gz
241 tar xvf Pmw.1.2.docsrc.tar
242 mv doc doc.old
243 cd docsrc
244 ./createmanuals.py
245 </pre>
246 </dd>
247 </dl>
248
249 <p>
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.
255
256 </p>
257
258 </dd>
259 <dt> <h2>Future plans and bugs</h2></dt><dd>
260
261 <p>
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
268 of Tk.
269
270 </p>
271
272 </dd>
273 <dt> <h2>Licence</h2></dt><dd>
274
275 <p>
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":
279 </p>
280 <cite>
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"
283 </cite>
284 <p>
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.
288 </p>
289
290 </dd>
291 <dt> <h2>Acknowledgements</h2></dt><dd>
292
293 <p>
294 The initial ideas for Pmw were blatantly stolen from the itcl
295 extensions
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.
301 </p>
302
303 <p>
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:
311
312 David Ascher,
313 Robin Becker,
314 Siggy Brentrup,
315 Mark Colclough,
316 Jerome Gay,
317 Clemens Hintze,
318 Rob Hooft
319 Jack Jansen,
320 Jonathan Kelly,
321 Magnus Kessler,
322 Matthias Klose,
323 Andreas Kostyrka,
324 Fredrik Lundh,
325 Magnus Lycka,
326 Graham Matthews,
327 Dieter Maurer,
328 Michael McLay,
329 Daniel Michelson,
330 Georg Mischler,
331 Rob Pearson,
332 Case Roole,
333 Joe Saltiel,
334 Roman Sulzhyk,
335 Shen Wang,
336 Chris Wright,
337   and
338 Guido van Rossum.
339
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.
342
343 My deepest apologies if I have forgotten anyone. Please let me know.
344
345 </p>
346     
347 <p>
348 The Pmw home page and project site is made available courtesy of
349 <a href="http://sourceforge.net">SourceForge</a>.
350
351 </p>
352 <p>
353
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>.
360
361 </p>
362 </dd>
363 </dl>
364
365
366     <center><P ALIGN="CENTER">
367     <IMG SRC = blue_line.gif ALT = "" WIDTH=320 HEIGHT=5>
368     </p></center>
369     
370
371     <font size=-1>
372     <center><P ALIGN="CENTER">
373     Pmw 1.2 -
374      5 Aug 2003
375      - <a href="index.html">Home</a>
376     
377     </p></center>
378     </font>
379
380     </body>
381     </html>
382