File: PmwAlphaExample.py

package info (click to toggle)
python-pmw 0.6.2-0.1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,652 kB
  • ctags: 2,716
  • sloc: python: 10,720; makefile: 44; sh: 24
file content (24 lines) | stat: -rw-r--r-- 702 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import string
import Pmw

_default_text = "AlphaExample example alpha Pmw megawidget.\nPmw version: " + \
    Pmw.version() + '\nPmw Alpha versions: ' + \
    string.join(Pmw.version(alpha = 1), ' ')
 
class AlphaExample(Pmw.MessageDialog):
    # Dummy widget for illustrating use of Pmw alpha version directory
 
    def __init__(self, parent = None, **kw):
 
	# Define the megawidget options.
	INITOPT = Pmw.INITOPT
	optiondefs = (
	    ('message_text', _default_text, None),
	)
	self.defineoptions(kw, optiondefs)
 
	# Initialise the base class (after defining the options).
	Pmw.MessageDialog.__init__(self, parent)
 
	# Check keywords and initialise options.
	self.initialiseoptions(AlphaExample)