def exec_code_all(lang, code, cwd=None):
    codefile = salt.utils.mkstemp()
    with salt.utils.fopen(codefile, 'w+t') as fp_:
        fp_.write(code)
    cmd = [lang, codefile]
    ret = run_all(cmd, cwd=cwd, python_shell=False)
    os.remove(codefile)
    return ret
Pass in two strings, the first naming the executable language, aka -
dataset/ETHPy150Open saltstack/salt/salt/modules/cmdmod.py/exec_code_all