Salome HOME
*** empty log message ***
[tools/eficas.git] / Pmw / Pmw_1_2 / tests / TestVersion.py
1 # Set the version of Pmw to use for the tests based on the directory
2 # name.
3
4 import imp
5 import os
6 import string
7 import Pmw
8
9 file = imp.find_module(__name__)[1]
10 if not os.path.isabs(file):
11     file = os.path.join(os.getcwd(), file)
12 file = os.path.normpath(file)
13
14 dir = os.path.dirname(file)
15 dir = os.path.dirname(dir)
16 dir = os.path.basename(dir)
17
18 version = string.replace(dir[4:], '_', '.')
19 Pmw.setversion(version)