Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80742 > unrolled thread
| Started by | Cameron Simpson <cs@zip.com.au> |
|---|---|
| First post | 2014-11-14 17:31 +1100 |
| Last post | 2014-11-14 17:31 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: fileno() not supported in Python 3.1 Cameron Simpson <cs@zip.com.au> - 2014-11-14 17:31 +1100
| From | Cameron Simpson <cs@zip.com.au> |
|---|---|
| Date | 2014-11-14 17:31 +1100 |
| Subject | Re: fileno() not supported in Python 3.1 |
| Message-ID | <mailman.15810.1415948559.18130.python-list@python.org> |
On 14Nov2014 13:52, Ben Finney <ben+python@benfinney.id.au> wrote: >satishmlmlml@gmail.com writes: >> How to get file descriptor number for the following: >> sys.stdin >> sys.stdout >> sys.stderr > >Why do you need this? What are you intending to do? In fairness, who cares? It is a basic and reasonable thing to do. I did it only last night: I wanted to know if stderr was a tty or pipe, versus a regular file, as I wanted to special case some error formatting (loosely speaking, default automatic people-friendliness versus log file verbosity). I know that why people want to do things is important, as they may be choosing the wrong approach. But the above question seems very simple and very basic: he seems unable to get the OS file descriptor number from the standard streams, and this is surprising. I think he even started the thead with almost a transcript of the failure, and backed off the the above abstraction when someone complained. Cheers, Cameron Simpson <cs@zip.com.au> | Alain van der Heide | This is the way the world ends | | avdh@dazixco.ingr.com | This is the way the world ends | | "The opinions expressed above are mine- | This is the way the world ends | | mineminemine, and you can't have them." | Not with a bang, but with a whi segmentation fault core dumped
Back to top | Article view | comp.lang.python
csiph-web