Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80731

Re: Bad file descriptor

From Ben Finney <ben+python@benfinney.id.au>
Subject Re: Bad file descriptor
Date 2014-11-14 10:56 +1100
References <442861d9-4280-4222-9084-f626a7782161@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.15802.1415923204.18130.python-list@python.org> (permalink)

Show all headers | View raw


satishmlmlml@gmail.com writes:

> import os
> os.write(1, b'Hello descriptor world\n')
> OSError: Bad file descriptor

It works fine for me::

    >>> import os
    >>> os.write(1, b'Hello descriptor world\n')
    Hello descriptor world
    23

You don't say which Python, or which version, you're using. In the
absence of different information, most of us will assume the latest
stable release of CPython. Currently, that is CPython 3.4.

-- 
 \      “I am too firm in my consciousness of the marvelous to be ever |
  `\       fascinated by the mere supernatural …” —Joseph Conrad, _The |
_o__)                                                     Shadow-Line_ |
Ben Finney

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bad file descriptor satishmlmlml@gmail.com - 2014-11-13 15:40 -0800
  Re: Bad file descriptor sohcahtoa82@gmail.com - 2014-11-13 15:43 -0800
  Re: Bad file descriptor Ben Finney <ben+python@benfinney.id.au> - 2014-11-14 10:56 +1100
    Re: Bad file descriptor Roy Smith <roy@panix.com> - 2014-11-13 19:41 -0500
  Re: Bad file descriptor Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-14 05:17 +0000
  Re: Bad file descriptor Cameron Simpson <cs@zip.com.au> - 2014-11-14 18:42 +1100

csiph-web