Message31531
When using a socket._fileobject as stdin or stdout, subprocess.Popen fails:
Traceback (most recent call last):
...
File "c:\Python25\lib\subprocess.py", line 586, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
File "c:\Python25\lib\subprocess.py", line 680, in _get_handles
p2cread = msvcrt.get_osfhandle(stdin.fileno())
IOError: [Errno 9] Bad file descriptor
Enclose are a _simple_ TCPSocket-Server using subprocess.Popen for echoing some text to the socket. On Linux this works, on Windows this fails with the above traceback.
Usage:
1) In one shell start tst_subprocess_socket.py
2) In a second shell start tst_subprocess_socket_client.py
3) On Window, the server will fail and produce the obove traceback.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:52:30 | admin | link | issue1681674 messages |
2007-08-23 14:52:30 | admin | create | |
|