def set_interactive(val=True):
    """set_interactive(val=True) -> None

    Set whether the interpreter is prompting for commands, or if commands
    were supplied as arguments.
    """
    global is_interactive
    is_interactive = val
