#! ./mofepython
#
# This is a test file for python build with the OSF/Motif 
# version of Wafe (renamed to mofepython). It serves two purposes:
#
#   - this is a tiny sample script using OSF/Motif widgets
#   - it shows how to set python callbacks via resource mechanisms
# 
# Gustaf Neumann              Mohegan Lake, NY, Sat Jun  4 17:58:27

import wafe

wafe.cmd( """
mergeResources topLevel \
	*valueChangedCallback "pythonS say {Oh boy, %w is now %s}" 

XmRowColumn rc topLevel isHomogeneous false radioBehavior true
XmToggleButton married rc
XmToggleButton divorced rc
XmPushButton Quit rc activateCallback quit
realize
""")

# this procedure will be called through wafe
def say(message):
  print message


wafe.process_events()










