Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v8plus / lib / python2.4 / site-packages / Pmw / Pmw_1_2 / tests / TestVersion.py
CommitLineData
920dae64
AT
1# Set the version of Pmw to use for the tests based on the directory
2# name.
3
4import imp
5import os
6import string
7import Pmw
8
9file = imp.find_module(__name__)[1]
10if not os.path.isabs(file):
11 file = os.path.join(os.getcwd(), file)
12file = os.path.normpath(file)
13
14dir = os.path.dirname(file)
15dir = os.path.dirname(dir)
16dir = os.path.basename(dir)
17
18version = string.replace(dir[4:], '_', '.')
19Pmw.setversion(version)