我无法使用python subprocess.Popen来插入模式...使用2.6.
测试:打开python解释器......
import subprocess
a = subprocess.Popen(['ping', '-c 1', '-p ff', '172.16.1.1'],subprocess.PIPE)
Run Code Online (Sandbox Code Playgroud)
结果... ping:模式必须指定为十六进制数字.
我已经将ff替换为:"f","23",23,0x23和一系列事物.我只是想看看shell认为它的结果.但是shell = True并没有像我预期的那样,a.communicate()给出(无,无)
使用B. Stroustrup的编程文本和关于pg 50的'hello world'程序会产生错误.我有"std_lib_facilities.h"包含文件的问题.
运行后(以root身份)'gcc hworld1.cpp'输出为 -
In file included from /usr/include/c++/4.4/ext/hash_map:60,
from std_lib_facilities.h:34,
from hworld1.cpp:1:
/usr/include/c++/4.4/backward/backward_warning.h:28: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
/tmp/ccpwXUYx.o: In function `main':
hworld1.cpp:(.text+0x14): undefined reference to `std::cout'
hworld1.cpp:(.text+0x19): undefined reference to …Run Code Online (Sandbox Code Playgroud)