Problems using subprocess.call() in Python 2.7.2 on Windows
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying the following and its failing with an error. I've tried to run it from Python shell/from a script/ on the windows console by invoking python on console. Nothing seems to work. Always the same error. from subprocess import call >>>pat = "d:\info2.txt" >>> call(["type",pat]) >>>Traceback (most recent call last): File " ", line 1, in call(["type",pat]) File "C:\Python27\lib\subprocess.py", line 493, in call return Popen(*popenargs, **kwargs).wait() File "C:\Python27\lib\subprocess.py", line 679, in __init__ errread, errwrite) File "C