Message137582
On Windows, I've been trying to call a test script that gets its I/O handled via file descriptors 3 & 4
socat EXEC:"python test.py userid",pty,fdin=3,fdout=4 TCP4:server:23,crlf
But I'm getting "[Errno 9] Bad file descriptor" when the python script attempts to os.fdopen(3, 'r').
I've tried just piping an echo's output redirected (3<&1 I think... though I might have that backwards as I've tried it every conceivable way) into the script, but I always get the bad file descriptor error.
I can create a pipe() in the program I can get an actual FD 3 & 4... but they seem to have no relation to the FD's that were set up by the invoking command-line/script.
I'm new to Python - is there something simple I'm overlooking, or is this a known bug that I just haven't been able to find in my last few hours of web searches? I can't believe I would be the only one doing this type of redirection on Windows.
Thanks in advance for any guidance/resolution you can offer. |
|
Date |
User |
Action |
Args |
2011-06-03 20:35:48 | 3vi1 | set | recipients:
+ 3vi1 |
2011-06-03 20:35:48 | 3vi1 | set | messageid: <1307133348.7.0.486629796214.issue12262@psf.upfronthosting.co.za> |
2011-06-03 20:35:48 | 3vi1 | link | issue12262 messages |
2011-06-03 20:35:47 | 3vi1 | create | |
|