Problemas usando subprocess.call () en Python 2.7.2 en Windows
Estoy intentando lo siguiente y está fallando con un error. Intenté ejecutarlo desde Python shell / desde un script / en la consola de Windows invocando python en la consola. Nada parece funcionar. Siempre el mismo error.
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
¿Alguien sabe lo que está mal aqu
incluso el simplecall(["date"]]
sin ningún argumento también falla con el mismo error.
Estoy usando: Python 2.72 versión de 32 bits en una máquina con Windows 7.