小编Dav*_*idT的帖子

Python子进程没有正确执行

我在向正在运行的屏幕输出命令时遇到问题.

使用以下代码:

import subprocess
subprocess.call(["screen", "-S jcmp", "-X stuff", "'kick Jman100'`echo -ne '\015'`"])
Run Code Online (Sandbox Code Playgroud)

返回以下内容:

Use: screen [-opts] [cmd [args]]
 or: screen -r [host.tty]

Options:
-a            Force all capabilities into each window's termcap.
-A -[r|R]     Adapt all windows to the new display width & height.
-c file       Read configuration file instead of '.screenrc'.
-d (-r)       Detach the elsewhere running screen (and reattach here).
-dmS name     Start as daemon: Screen session in detached mode.
-D (-r)       Detach and logout remote (and reattach …
Run Code Online (Sandbox Code Playgroud)

python linux bash subprocess gnu-screen

2
推荐指数
1
解决办法
1275
查看次数

标签 统计

bash ×1

gnu-screen ×1

linux ×1

python ×1

subprocess ×1