This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author 3vi1
Recipients 3vi1
Date 2011-06-03.20:35:47
SpamBayes Score 2.3661758e-07
Marked as misclassified No
Message-id <1307133348.7.0.486629796214.issue12262@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-06-03 20:35:483vi1setrecipients: + 3vi1
2011-06-03 20:35:483vi1setmessageid: <1307133348.7.0.486629796214.issue12262@psf.upfronthosting.co.za>
2011-06-03 20:35:483vi1linkissue12262 messages
2011-06-03 20:35:473vi1create