python - 有没有办法从你的代码中响应 input() ?
问题描述
我最近制作了一个 python 包,现在我正在制作一段代码来自动化更新包的过程。在我的代码中,我这样做:
os.system('twine upload --repository-url https://upload.pypi.org/legacy/ dist/*')
当我的代码执行该行时,它会说Enter your username:
并且我想响应__token__
该输入提示。
有没有办法做到这一点?
解决方案
推荐阅读
- c# - 如何装饰依赖项但仅在子容器中
- python - TypeError:JSON 对象必须是 str、bytes 或 bytearray,而不是 list
- delphi - 取消后重用 ADOQuery
- sql - 无法创建数据库加密密钥
- firebase - 在 google firestore 中使用事务的缺点
- microsoft-translator - Azure 文本翻译 API:字符的定义是什么?
- java - jni中调用方法
- makefile - 在 macbook pro / "cuda_runtime.h" 上制作 yolo
- c - 二叉搜索树算法,它返回一个范围内的值数组
- java - 类缺失覆盖