stdin and py2exe

Mike Tammerman mtammerman at
Wed Sep 14 19:27:57 CEST 2005


I want create a subprocess using Popen and pipe some input to it.
Although everything works perfectly while executing python in, it
doesn't work if I try with executables made by py2exe.

I think, stdin is invalidated if the program becomes an executable.
Because I get a "Bad file descriptor" exception in I
will be more than apreciated, if any suggestions occur.


== ==
from subprocess import *

pInput = Popen('python', stdin=PIPE, shell=True).stdin
# pInput = Popen('subprogram.exe', stdin=PIPE, shell=True).stdin #
doesn't work


== ==
import sys

input =  # Throws a bad descriptor exception.
print input

More information about the Python-list mailing list