only complain about missing Mentat release if needed...
This commit is contained in:
parent
34645a7222
commit
dfb791bcaf
|
@ -4,13 +4,6 @@ import sys, os, string, damask
|
||||||
from colorsys import *
|
from colorsys import *
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
sys.path.append(damask.solver.Marc().libraryPath('../../'))
|
|
||||||
|
|
||||||
try:
|
|
||||||
from py_mentat import *
|
|
||||||
except:
|
|
||||||
sys.stderr.write('warning: no valid Mentat release found')
|
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
def readConfig(configFile,ownPath):
|
def readConfig(configFile,ownPath):
|
||||||
|
@ -205,16 +198,18 @@ else:
|
||||||
rgbColors = [ hls_to_rgb(hlsColor[0], hlsColor[1], hlsColor[2])
|
rgbColors = [ hls_to_rgb(hlsColor[0], hlsColor[1], hlsColor[2])
|
||||||
for hlsColor in hlsColors ]
|
for hlsColor in hlsColors ]
|
||||||
|
|
||||||
if options.palette:
|
if options.palette or options.palettef:
|
||||||
for rgb in rgbColors:
|
for rgb in rgbColors:
|
||||||
print '\t'.join(map(lambda x: str(int(255*x)),rgb))
|
print '\t'.join(map(lambda x: {True: str(int(255*x)),
|
||||||
sys.exit(0)
|
False:str( x)}[options.palette],rgb))
|
||||||
if options.palettef:
|
else:
|
||||||
for rgb in rgbColors:
|
|
||||||
print '\t'.join(map(str,rgb))
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
### connect to mentat and change colorMap
|
### connect to mentat and change colorMap
|
||||||
|
sys.path.append(damask.solver.Marc().libraryPath('../../'))
|
||||||
|
try:
|
||||||
|
from py_mentat import *
|
||||||
|
except:
|
||||||
|
sys.stderr.write('error: no valid Mentat release found\n')
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
outputLocals = {}
|
outputLocals = {}
|
||||||
print 'waiting to connect...'
|
print 'waiting to connect...'
|
||||||
|
@ -227,5 +222,3 @@ py_disconnect()
|
||||||
|
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
output(cmds,outputLocals,'Stdout')
|
output(cmds,outputLocals,'Stdout')
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue