Example #1
0
            apps = db.display_query(s, output=False)
            if apps == []:
                puts(
                    colored.red("{} does not exist in database.".format(
                        a9["search"])))
            else:
                apps = dict(apps)
                for i in apps.keys():
                    q4[0]["choices"].append({"name": i})
                a4 = prompt(q4, style=style)

        if a4["install"] == []:
            puts(colored.red("You have to select at least one app."))
        else:
            for i in a4["install"]:
                s = db.download(a1["userid"], apps[i])
                if not s:
                    puts(
                        colored.red(
                            "{} is a paid app, you have to pay to download it".
                            format(i)))
                    a6 = prompt(q6, style=style)
                    pays = {}
                    if a6["buy"]:
                        for j in ("debitcard", "creditcard", "ewallet",
                                  "netbanking"):
                            q7[0]["choices"].append(
                                Separator("= {} =".format(j)))
                            payments = db.get_payment(a1["userid"], j, False)
                            payments = dict(payments)
                            for k in payments.keys():