no need anymore for msc python interface when dealing with spectralOut files

This commit is contained in:
Philip Eisenlohr 2011-02-22 15:57:27 +00:00
parent 8a5e28d5a6
commit 2dc3b35725
1 changed files with 26 additions and 23 deletions

View File

@ -9,29 +9,6 @@ releases = {'2010':['linux64',''],
'2005r3':[''], '2005r3':[''],
} }
try:
file = open('%s/../MSCpath'%os.path.dirname(os.path.realpath(sys.argv[0])))
MSCpath = os.path.normpath(file.readline().strip())
file.close()
except:
MSCpath = '/msc'
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
try:
from py_post import *
except:
print('error: no valid Mentat release found in %s'%MSCpath)
sys.exit(-1)
# ----------------------------- # -----------------------------
class vector: # mimic py_post node object class vector: # mimic py_post node object
@ -650,6 +627,32 @@ parser.set_defaults(separateFiles = False)
(options, file) = parser.parse_args() (options, file) = parser.parse_args()
try:
file = open('%s/../MSCpath'%os.path.dirname(os.path.realpath(sys.argv[0])))
MSCpath = os.path.normpath(file.readline().strip())
file.close()
except:
MSCpath = '/msc'
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
try:
from py_mentat import *
except:
if options.filetype == 'marc':
print('no valid Mentat release found in %s'%MSCpath)
sys.exit(-1)
bg = backgroundMessage() bg = backgroundMessage()
bg.start() bg.start()