I have installed python 2.6 into a host and python 2.7 and python 3 as well
the below code is working fine in pythn3 and python 2.7 but not working in python 2.6
>>> f=open("/tmp/abcd.txt", "w")
>>> shellscript = subprocess.Popen(["/tmp/shell.sh"], stdin=f, stdout=f, stderr=subprocess.PIPE, preexec_fn=default_sigpipe)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
But the same code is working well as /tmp/shell.sh is always available and rwx as well
Please help