# programSettings.py import os import ExternalPrgParameters SPD, RPD = ExternalPrgParameters.get_program_dictionaries() from olexFunctions import OV import olx import olex_core import OlexVFS def doProgramSettings(programName, methodName, postSolution=False): if not OV.IsFileType('ires'): return if programName in SPD.programs: program = SPD.programs[programName] prgtype = 'solution' elif programName in RPD.programs: program = RPD.programs[programName] prgtype = 'refinement' else: return method = program.methods[methodName] method.calculate_defaults() if not postSolution: method.getValuesFromFile() if prgtype == 'refinement': method.addInstructions() if OV.HasGUI(): makeProgramSettingsGUI(program, method, prgtype) return '' OV.registerFunction(doProgramSettings) def makeProgramSettingsGUI(program, method, prgtype): if prgtype == 'solution': wFilePath = 'solution-settings-extra.htm' else: wFilePath = 'refinement-settings-extra.htm' authors = program.author reference = program.reference help = OV.TranslatePhrase(method.help) # this is included into
but renders 2 tables txt = r""" """ # mind first %s formatting - as it could be