def get_login_password(site_name="github.com", netrc_file="~/.netrc"):
"""Read a .netrc file and return login/password for LWN."""
n = netrc.netrc(os.path.expanduser(netrc_file))
return n.hosts[site_name][0], n.hosts[site_name][2]
评论列表
文章目录