小编Ben*_*Ben的帖子

子进程。CREATE_NEW_CONSOLE

我有这个Python代码。

import subprocess

subprocess.Popen("airmon-ng check kill", creationflags = subprocess.CREATE_NEW_CONSOLE)
Run Code Online (Sandbox Code Playgroud)

Linux Mint上的Python 2.7.6给我以下错误:

    subprocess.Popen("airmon-ng check kill", creationflags = subprocess.CREATE_NEW_CONSOLE)
    AttributeError: 'module' object has no attribute 'CREATE_NEW_CONSOLE'
Run Code Online (Sandbox Code Playgroud)

Windows 8.1上的相同之处在于:

Traceback (most recent call last):
File "C:\Users\Ben\Dropbox\Coding\jam.py", line 10, in <module>
subprocess.Popen("airmon-ng check kill", creationflags = subprocess.CREATE_NEW_CONSOLE)
File "C:\Python27\lib\subprocess.py", line 710, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 958, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Run Code Online (Sandbox Code Playgroud)

python subprocess popen

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

标签 统计

popen ×1

python ×1

subprocess ×1