Python click.prompt方法代码示例

您所在的位置:网站首页 prompt怎么读 Python click.prompt方法代码示例

Python click.prompt方法代码示例

#Python click.prompt方法代码示例| 来源: 网络整理| 查看: 265

本文整理汇总了Python中click.prompt方法的典型用法代码示例。如果您正苦于以下问题:Python click.prompt方法的具体用法?Python click.prompt怎么用?Python click.prompt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在click的用法示例。

在下文中一共展示了click.prompt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: run # 需要导入模块: import click [as 别名] # 或者: from click import prompt [as 别名] def run(host, port, username, version, timeout, password, logfile, filename, ssl, read_only): if version: print("cycli {}".format(__version__)) sys.exit(0) if username and not password: password = click.prompt("Password", hide_input=True, show_default=False, type=str) try: cycli = Cycli(host, port, username, password, logfile, filename, ssl, read_only, timeout) except AuthError: print("Unauthorized. See cycli --help for authorization instructions.") except ConnectionError: print("Connection refused. Is Neo4j turned on?") else: cycli.run() 开发者ID:nicolewhite,项目名称:cycli,代码行数:18,代码来源:main.py 示例2: getcloudloginkey # 需要导入模块: import click [as 别名] # 或者: from click import prompt [as 别名] def getcloudloginkey(ctx, account): """ Return keys for cloudlogin """ from bitsharesbase.account import PasswordKey password = click.prompt("Passphrase", hide_input=True).strip() t = [["role", "wif", "pubkey", "accounts"]] for role in ["owner", "active", "memo"]: wif = PasswordKey(account, password, role=role) pubkey = format(wif.get_public_key(), ctx.bitshares.rpc.chain_params["prefix"]) t.append( [ role, str(wif.get_private_key()), pubkey, ctx.bitshares.wallet.getAccountFromPublicKey(pubkey) or "", ] ) print_table(t) 开发者ID:bitshares,项目名称:uptick,代码行数:23,代码来源:tools.py 示例3: allow # 需要导入模块: import click [as 别名] # 或者: from click import prompt [as 别名] def allow(ctx, foreign_account, permission, weight, threshold, account): """ Add a key/account to an account's permission """ if not foreign_account: from bitsharesbase.account import PasswordKey pwd = click.prompt( "Password for Key Derivation", hide_input=True, confirmation_prompt=True ) foreign_account = format( PasswordKey(account, pwd, permission).get_public(), "BTS" ) print_tx( ctx.bitshares.allow( foreign_account, weight=weight, account=account, permission=permission, threshold=threshold, ) ) 开发者ID:bitshares,项目名称:uptick,代码行数:23,代码来源:account.py 示例4: get_field # 需要导入模块: import click [as 别名] # 或者: from click import prompt [as 别名] def get_field(schema, path, options, type=str, default=None, msg=None): field = path[-1] field = field.replace("_", " ") field = re.sub(r"(?


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3