Did I find the right examples for you? yes no

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)

        def yesno(prompt, default=None):
    """
    Prompt the user for a yes or no.

    Can optionally specify a default value, which will only be
    used if they enter a blank line.

    Unrecognised input (anything other than "y", "n", "yes",
    "no" or "") will return None.
    """
    answer = raw_input(prompt).strip().lower()

    if answer == "y" or answer == "yes":
        return True
    elif answer == "n" or answer == "no":
        return False
    elif answer == "":
        return default
    else:
        return None
        


src/f/l/flirc-xbmc-plugin-HEAD/src/script.flirc/keyboard.py   flirc-xbmc-plugin(Download)
    def format(self):
        #utils.log("******************* format *******************")
        if not utils.yesno(1, 7, 0, 8):
            self.setInfoBox(utils.getString(4))
            return

src/f/i/fig-0.3.2/fig/cli/main.py   fig(Download)
from .formatter import Formatter
from .log_printer import LogPrinter
from .utils import yesno
 
from ..packages.docker.client import APIError
            print("Going to remove", list_containers(stopped_containers))
            if options.get('--force') \
                    or yesno("Are you sure? [yN] ", default=False):
                self.project.remove_stopped(
                    service_names=options['SERVICE'],

src/f/i/fig-HEAD/fig/cli/main.py   fig(Download)
from .formatter import Formatter
from .log_printer import LogPrinter
from .utils import yesno
 
from ..packages.docker.errors import APIError
            print("Going to remove", list_containers(stopped_containers))
            if options.get('--force') \
                    or yesno("Are you sure? [yN] ", default=False):
                self.project.remove_stopped(
                    service_names=options['SERVICE'],