New submission from Jesse Litton <3vi...@gmail.com>:
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.
--
components: Interpreter Core
messages: 137582
nosy: 3vi1
priority: normal
severity: normal
status: open
title: Not Inheriting File Descriptors on Windows?
type: behavior
versions: Python 3.1
___
Python tracker
<http://bugs.python.org/issue12262>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com