def _ask_user(): if not conf.interactive: return False while True: _confir = input("Do you want to start it ? (yes/no) [y]: ").lower().strip() if _confir in ["yes", "y", ""]: return True elif _confir in ["no", "n"]: return False return False
def _ask_user(): if not conf.interactive: return False msg = "Do you want to start it ? (yes/no) [y]: " try: # Better IPython compatibility import IPython return IPython.utils.io.ask_yes_no(msg, default='y') except (NameError, ImportError): while True: _confir = input(msg) _confir = _confir.lower().strip() if _confir in ["yes", "y", ""]: return True elif _confir in ["no", "n"]: return False