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 "<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
does anyone know what is wrong here.!!???
even the simple call(["date"]]
without any arguements also fails with the same error.
I'm using : Python 2.72 32bit version on a windows 7 machine.