简体   繁体   English

如何使用pycurl提示输入密码? (相当于 curl -u)

[英]How to prompt for password with pycurl? (equivalent to curl -u)

是否有相当于curl -u username的 pycurl 可以让 Python 提示我输入密码?

pycurl does not have a feature where it will prompt for a password. pycurl 没有提示输入密码的功能。

However, your program can issue the request without credentials and if the response is 401 perform the password prompt using facility such as the getpass standard library module.但是,您的程序可以在没有凭据的情况下发出请求,如果响应是 401,则使用诸如getpass标准库模块之类的工具执行密码提示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM