Problemas usando subprocess.call () no Python 2.7.2 no Windows
Estou tentando o seguinte e está falhando com um erro. Eu tentei executá-lo a partir do shell Python / de um script / no console do Windows, invocando o python no console. Nada parece funcionar. Sempre o mesmo erro.
from subprocess import call
>>>pat = "d:\info2.txt"
>>> call(["type",pat])
>>>Traceback (most recent call last):
File "<pyshell#56>", line 1, in <module>
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:\Python27\lib\subprocess.py", line 893, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
alguém sabe o que está errado aqui. !! ???
mesmo o simplescall(["date"]]
sem argumentos também falha com o mesmo erro.
Estou usando: Python 2.72 versão de 32 bits em uma máquina com Windows 7.