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


Groups > comp.lang.python > #80748

Re: Bad file descriptor

Path csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <cameron@cskk.homeip.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:file': 0.07; 'ide': 0.09; 'python': 0.11; 'question.': 0.14; 'descriptor': 0.16; 'fiction.': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'function?': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'number?': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'script,': 0.16; 'simpson': 0.16; 'wow,': 0.16; 'wrote:': 0.18; 'command': 0.22; 'python?': 0.22; 'header:User-Agent:1': 0.23; 'cheers,': 0.24; 'environment': 0.24; 'question': 0.24; 'post': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'newer': 0.30; 'work.': 0.31; '(which': 0.31; 'context.': 0.31; 'occurs': 0.31; 'file': 0.32; 'probably': 0.32; 'running': 0.33; 'version': 0.36; 'received:com.au': 0.36; 'charset:us-ascii': 0.36; 'received:211': 0.38; 'to:addr:python-list': 0.38; 'bad': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'you.': 0.62; 'content-disposition:inline': 0.62; 'email addr:gmail.com': 0.63; 'provide': 0.64; 'more': 0.64; '4th': 0.74; 'physiology': 0.84; 'short,': 0.84; 'louis': 0.91
Date Fri, 14 Nov 2014 18:42:40 +1100
From Cameron Simpson <cs@zip.com.au>
To python-list@python.org
Subject Re: Bad file descriptor
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Disposition inline
In-Reply-To <442861d9-4280-4222-9084-f626a7782161@googlegroups.com>
User-Agent Mutt/1.5.23 (2014-03-12)
References <442861d9-4280-4222-9084-f626a7782161@googlegroups.com>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=J0QyKEt1u0cA:10 a=kj9zAlcOel0A:10 a=vrnE16BAAAAA:8 a=pGLkceISAAAA:8 a=kREIM2PjLzwD2zrMsBQA:9 a=ir8VwWgvVe-qGZE2:21 a=2CiUzf4hKjhMulvd:21 a=CjuIK1q_8ugA:10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15815.1415952546.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1415952546 news.xs4all.nl 2974 [2001:888:2000:d::a6]:33879
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:80748

Show key headers only | View raw


On 13Nov2014 15:40, satishmlmlml@gmail.com <satishmlmlml@gmail.com> wrote:
>import os
>os.write(1, b'Hello descriptor world\n')
>OSError: Bad file descriptor
>
>How to give a file descriptor number to this function? How to get a file descriptor number?

Wow, this must be at least the 4th post of the same question.
It now occurs to me that a newer Python won't help you.

Are you running this at a command prompt?
Or are you running this in some IDE?

The reason I ask this question is that at a command prompt, the above would 
probably work.

In short, please provide more context. What OS? What version of Python? What 
environment (command prompt, IDE (which one?), a standalone script, etc)?

CHeers,
Cameron Simpson <cs@zip.com.au>

Louis Pasteur's theory of germs is ridiculous fiction.
       --Pierre Pachet, Professor of Physiology at Toulouse, 1872

Back to comp.lang.python | Previous | Next — Previous 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