Example #1
0
def _exec( X ): 
    """ 
    simple example of wrapper where compute is made in an external program
    """

    # write input point
    in_file = 'input.py'
    coupling_tools.replace('input_template', in_file, ['@E', '@F'], X)

    # work, work, work
    coupling_tools.execute(external_program + " " + in_file)

    Y = coupling_tools.get('output.py', tokens=['Z='])

    return Y
Example #2
0
def _exec( X ):
    in_file = 'input.py'
    ct.replace('input_template.py', in_file, ['@E', '@F'], X)
    ct.execute('python external_program.py ' + in_file)
    return ct.get('output.py', tokens=['Z='])