Example #1
0
def with_options(name,price,options):
    return (name,
            subopts(name,price,[(x,0.00) for x in options],
                    connector=", ",nameconnector=" "))
Example #2
0
def with_options(name, price, options):
    return (name,
            subopts(name,
                    price, [(x, 0.00) for x in options],
                    connector=", ",
                    nameconnector=" "))
Example #3
0
    ("Chicken Pasty",4.50),
    ("Chorizo & Artichoke Salad",4.50)
    ],title="Starters")

steak=simplemenu([
    ("Blue Steak",10.50),
    ("Rare Steak",10.50),
    ("Medium Rare Steak",10.50),
    ("Medium Steak",10.50),
    ("Medium Well Done Steak",10.50),
    ("Well Done Steak",10.50),
    ("Charcoal Steak",10.50)],title="Steak")

sausages=subopts("Sausages",7.50,
                 [("Cumberland",0.00),
                  ("Pork & Leek",0.00),
                  ("Boerwars",0.00)],
                 atmost=3, atleast=1, connector=", ")

maincourses=simplemenu([
    with_options("Ploughman's",7.50,
                 ["without Ardrahan","without Stilton","without Golden Cross",
                  "without Cheddar",
                  "with Ardrahan instead","with Stilton instead",
                  "with Golden Cross instead","with Cheddar instead",
                  "filler","filler 2","filler 3","filler 4","filler 5",
                  "filler 6"]),
    ("Nut Burger",7.50),
    ("Sausages",sausages),
    ("Beef Burger",7.50),
    ("Lamb & Apricot Stew",7.50),
Example #4
0
starters = simplemenu([("Carrot & Coriander Soup", 3.50),
                       ("Pork Pie and Salad", 4.50),
                       ("Smoked Trout Salad", 4.50), ("Chicken Pasty", 4.50),
                       ("Chorizo & Artichoke Salad", 4.50)],
                      title="Starters")

steak = simplemenu([("Blue Steak", 10.50), ("Rare Steak", 10.50),
                    ("Medium Rare Steak", 10.50), ("Medium Steak", 10.50),
                    ("Medium Well Done Steak", 10.50),
                    ("Well Done Steak", 10.50), ("Charcoal Steak", 10.50)],
                   title="Steak")

sausages = subopts("Sausages",
                   7.50, [("Cumberland", 0.00), ("Pork & Leek", 0.00),
                          ("Boerwars", 0.00)],
                   atmost=3,
                   atleast=1,
                   connector=", ")

maincourses = simplemenu([
    with_options("Ploughman's", 7.50, [
        "without Ardrahan", "without Stilton", "without Golden Cross",
        "without Cheddar", "with Ardrahan instead", "with Stilton instead",
        "with Golden Cross instead", "with Cheddar instead", "filler",
        "filler 2", "filler 3", "filler 4", "filler 5", "filler 6"
    ]), ("Nut Burger", 7.50), ("Sausages", sausages), ("Beef Burger", 7.50),
    ("Lamb & Apricot Stew", 7.50), ("Tagliatelle", 7.50),
    ("Aubergine Bake", 7.50), ("Beef & Rauchbier Pie", 8.50),
    with_options("Grey Mullet Fillet", 8.50, ["with chips instead"]),
    ("Steak", steak)
],