写入Python subprocess.Popen obj的文件描述符3

2024-05-13 18:02:13 发布

您现在位置:Python中文网/ 问答频道 /正文

如何写入subprocess.Popen对象的文件描述符3?

我试图用Python(不使用命名管道)在下面的shell命令中完成重定向:

$ gpg --passphrase-fd 3 -c 3<passphrase.txt < filename.txt > filename.gpg

Tags: 文件对象命令txt管道shellfilenamegpg