Jon Ribbens wrote: > I think that's changing Python's idea of stdin etc but not the > operating system's idea of them. You won't be closing the original > file descriptors, and if you run any subprocesses they will end up > with the original stdin/out/err. Unless sys.stdin is more magic > than I'm aware of.
Jon is correct here. You must close or redirect the underlying C file descriptor. Python's sys.std streams don't magically do this for you because Python keeps a backup of the standard streams for internal purpose in sys.__std*__. os.dup2 is the best solution. Christian -- http://mail.python.org/mailman/listinfo/python-list