no need anymore for msc python interface when dealing with spectralOut files
This commit is contained in:
parent
8a5e28d5a6
commit
2dc3b35725
|
@ -9,29 +9,6 @@ releases = {'2010':['linux64',''],
|
|||
'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
|
||||
|
@ -650,6 +627,32 @@ parser.set_defaults(separateFiles = False)
|
|||
|
||||
(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.start()
|
||||
|
||||
|
|
Loading…
Reference in New Issue