def run_on_exec(script):
    """Compile and Exec sccrip.

    Parameters
    ----------
    script : str
        Python script to be executed.

    """
    compiled = compile(script + '\n', '<string>', 'exec')
    exec(compiled, locals(), locals())
