本文整理汇总了Python中cli.CLI.get_email方法的典型用法代码示例。如果您正苦于以下问题:Python CLI.get_email方法的具体用法?Python CLI.get_email怎么用?Python CLI.get_email使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cli.CLI
的用法示例。
在下文中一共展示了CLI.get_email方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Authentication
# 需要导入模块: from cli import CLI [as 别名]
# 或者: from cli.CLI import get_email [as 别名]
if __name__ == "__main__":
# We have to authenticate here so that Authentication can use the sudo
# password while installing packages. If we don't authenticate here, the
# message telling the user to enter their sudo password may get overwritten
# by the Halo spinner.
with Authentication():
pass
setup_logging(LOG_FILE, logging.INFO)
file(
"~/.gitconfig",
"gitconfig.template",
load_vars=lambda: {
'fullname': CLI.get_full_name(),
'email': CLI.get_email()
}
)
backup_time = datetime.datetime.now().strftime("%Y.%m.%d.%H.%M.%S")
backup_dir = os.path.join(
HOME, os.path.join(".dotfiles_backup", backup_time)
)
bot("Installing top-level dotfiles")
create_symlinks(
os.path.join(ROOT, "homedir"), HOME, backup_dir
)
bot("Installing .config dotfiles")
ensure_directory(os.path.join(HOME, ".config"))
create_symlinks(
os.path.join(ROOT, "config"), os.path.join(HOME, ".config"), backup_dir
)