# Set the version of Pmw to use for the demonstrations based on the
if not os
.path
.isabs(path
):
path
= os
.path
.join(os
.getcwd(), path
)
if not os
.path
.islink(path
):
dir = os
.path
.dirname(path
)
path
= os
.path
.join(dir, os
.readlink(path
))
file = imp
.find_module(__name__
)[1]
file = os
.path
.normpath(file)
dir = os
.path
.dirname(file)
dir = os
.path
.dirname(dir)
dir = os
.path
.basename(dir)
version
= string
.replace(dir[4:], '_', '.')
if version
in Pmw
.installedversions():
print 'No such Pmw version', `version`
+ '.',
print 'Using default version', `Pmw
.version()`