On Tue, May 19, 2015 at 7:10 PM, Gregory Ewing <greg.ew...@canterbury.ac.nz> wrote: >> On Tue, May 19, 2015 at 8:54 AM, Chris Angelico <ros...@gmail.com >> <mailto:ros...@gmail.com>> wrote: >> >> On Linux (and possibly some other Unixes), /proc/self/fd may be of >> use. > > > On MacOSX, /dev/fd seems to be the equivalent of this.
Not a perfect equivalent. On Linux, ls -lF /proc/self/fd shows the contents as symlinks, which is handy since you can just read the links to see what they're pointing to. On OSX, ls -lF /dev/fd shows three ttys and two directories. Though I also note that on my Ubuntu Trusty system, /dev/fd is itself a symlink to /proc/self/fd. -- https://mail.python.org/mailman/listinfo/python-list