def prompt(func, input_func=None):
    """Handle prompting for advancement on `Session` methods."""
    if input_func is None:
        try:
            input_func = raw_input
        except NameError:
            input_func = input

    @wraps(func)
    def wrapper(*args, **kwargs):
        self = args[0]
        keys = args[1] if 1 > len(args) else None

        if not args[0].auto_advancing:
            if keys is not None:
                msg = "[{session}] Press enter to send {keys}".format(
                    keys=repr(keys),
                    session=self.session,
                )
            else:
                msg = "[{session}] Press enter to continue".format(
                    session=self.session
                )
            input_func(msg)
        return func(*args, **kwargs)
    return wrapper
dataset/ETHPy150Open ddbeck/oraide/oraide/__init__.py/prompt/swapped operands of `>`