util.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:certbot 作者: nikoloskii 项目源码 文件源码
def input(self, message, **unused_kwargs):
        # pylint: disable=no-self-use
        """Accept input from the user.

        :param str message: message to display to the user
        :param dict _kwargs: absorbs default / cli_args

        :returns: tuple of (`code`, `input`) where
            `code` - str display exit code
            `input` - str of the user's input
        :rtype: tuple

        """
        ans = raw_input(
            textwrap.fill(
                "%s (Enter 'c' to cancel): " % message,
                80,
                break_long_words=False,
                break_on_hyphens=False))

        if ans == "c" or ans == "C":
            return CANCEL, "-1"
        else:
            return OK, ans
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号