diff --git a/processing/MSCpath b/processing/MSCpath new file mode 100644 index 000000000..fb65447d6 --- /dev/null +++ b/processing/MSCpath @@ -0,0 +1 @@ +/msc diff --git a/processing/post/postResults b/processing/post/postResults index 9cf20c186..4318ce77c 100755 --- a/processing/post/postResults +++ b/processing/post/postResults @@ -1,15 +1,28 @@ #!/usr/bin/env python -releases = ['2010b3','2008r1','2007r1','2005r3'] - - import os, sys, math, re, threading, time from optparse import OptionParser, OptionGroup, Option, SUPPRESS_HELP -for release in releases: - libPath = '/msc/mentat%s/shlib/'%release + +releases = {'2010':['linux64',''], + '2008r1':[''], + '2007r1':[''], + '2005r3':[''], + } + +file = open('%s/../MSCpath'%os.path.dirname(sys.argv[0])) +MSCpath = os.path.normpath(file.readline().strip()) +file.close() + +for release,subdirs in sorted(releases.items(),reverse=True): + for subdir in subdirs: + libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir) if os.path.exists(libPath): - sys.path.append(libPath) - break + sys.path.append(libPath) + break + else: + continue + break + from py_post import * @@ -368,7 +381,7 @@ Example: 2) global sum of squared data falling into first quadrant arc between R1 and R2 --filter 'x*x + y*y >= R1*R1 and x*x + y*y <= R2*R2' --map 'lambda list: sum([item*item for item in list])' -$Id: postResults 205 2010-06-08 15:23:31Z MPIE\p.eisenlohr $ +$Id$ """) parser.add_option('-i','--info', action='store_true', dest='info', \ @@ -685,7 +698,7 @@ for increment in increments: file = open(outFilename,'w') fileOpen = True file.write('2\theader\n') - file.write('$Id: postResults 205 2010-06-08 15:23:31Z MPIE\p.eisenlohr $\n') + file.write('$Id$\n') if options.time: basic = ['inc','time'] else: diff --git a/processing/pre/mentat_colorMap b/processing/pre/mentat_colorMap index 704676f9c..25e8a8740 100755 --- a/processing/pre/mentat_colorMap +++ b/processing/pre/mentat_colorMap @@ -1,21 +1,29 @@ #!/usr/bin/env python - import sys, os from colorsys import * from optparse import OptionParser -releases = ['2010','2008r1','2007r1','2005r3'] +releases = {'2010':['linux64',''], + '2008r1':[''], + '2007r1':[''], + '2005r3':[''], + } + +file = open('%s/../MSCpath'%os.path.dirname(sys.argv[0])) +MSCpath = os.path.normpath(file.readline().strip()) +file.close() + +for release,subdirs in sorted(releases.items(),reverse=True): + for subdir in subdirs: + libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir) + if os.path.exists(libPath): + sys.path.append(libPath) + break + else: + continue + break -for release in releases: - libPath = '/msc/mentat%s/shlib/'%release - if os.path.exists(libPath): - sys.path.append(libPath) - for subdir in [os.path.join(libPath,file) - for file in os.listdir(libPath) - if os.path.isdir(os.path.join(libPath,file))]: - sys.path.append(subdir) - break from py_mentat import * diff --git a/processing/pre/mentat_patchFromReconstructedBoundaries b/processing/pre/mentat_patchFromReconstructedBoundaries index a5aba98d2..27730eeff 100755 --- a/processing/pre/mentat_patchFromReconstructedBoundaries +++ b/processing/pre/mentat_patchFromReconstructedBoundaries @@ -1,17 +1,29 @@ #!/usr/bin/env python -releases = ['2010r1','2008r1','2007r1','2005r3'] - - import sys,os,pwd,math,re #import Image,ImageDraw from optparse import OptionParser -for release in releases: - libPath = '/msc/mentat%s/shlib/'%release - if os.path.exists(libPath): - sys.path.append(libPath) - break +releases = {'2010':['linux64',''], + '2008r1':[''], + '2007r1':[''], + '2005r3':[''], + } + +file = open('%s/../MSCpath'%os.path.dirname(sys.argv[0])) +MSCpath = os.path.normpath(file.readline().strip()) +file.close() + +for release,subdirs in sorted(releases.items(),reverse=True): + for subdir in subdirs: + libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir) + if os.path.exists(libPath): + sys.path.append(libPath) + break + else: + continue + break + from py_mentat import * diff --git a/processing/pre/mentat_pbcOnBoxMesh b/processing/pre/mentat_pbcOnBoxMesh index 5fda5adfb..48e7fda9f 100755 --- a/processing/pre/mentat_pbcOnBoxMesh +++ b/processing/pre/mentat_pbcOnBoxMesh @@ -1,21 +1,29 @@ #!/usr/bin/env python -releases = ['2010','2008r1','2007r1','2005r3'] - - import sys,os,pwd,math,re #import Image,ImageDraw from optparse import OptionParser -for release in releases: - libPath = '/msc/mentat%s/shlib/'%release - if os.path.exists(libPath): - sys.path.append(libPath) - for subdir in [os.path.join(libPath,file) - for file in os.listdir(libPath) - if os.path.isdir(os.path.join(libPath,file))]: - sys.path.append(subdir) - break +releases = {'2010':['linux64',''], + '2008r1':[''], + '2007r1':[''], + '2005r3':[''], + } + +file = open('%s/../MSCpath'%os.path.dirname(sys.argv[0])) +MSCpath = os.path.normpath(file.readline().strip()) +file.close() + +for release,subdirs in sorted(releases.items(),reverse=True): + for subdir in subdirs: + libPath = '%s/mentat%s/shlib/%s'%(MSCpath,release,subdir) + if os.path.exists(libPath): + sys.path.append(libPath) + break + else: + continue + break + from py_mentat import * def outMentat(cmd,locals):