Henryk Modzelewski <[EMAIL PROTECTED]> wrote: >It might be a trivial question, but I seem to be lost. > >Is there a way to get names of the files associated with stdin/out/ >err if those are redirected to the files at the shell command-line?
I doubt there is a portable way. On most linux-based systems,
os.readlink("/proc/self/fd/1")
and
os.readlink("/proc/self/fd/2")
will work.
-M-
--
http://mail.python.org/mailman/listinfo/python-list
