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


Groups > comp.lang.python > #52564

Re: Pair of filenos read/write each other?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'satisfy': 0.09; 'python': 0.11; 'descriptor': 0.16; 'from:addr:pitrou.net': 0.16; 'from:addr:solipsis': 0.16; 'from:name:antoine pitrou': 0.16; 'message-id:@post.gmane.org': 0.16; 'received:213.41.240': 0.16; 'received:213.41.240.54': 0.16; 'received:80.91.229.3': 0.16; 'received:charlus.yi.org': 0.16; 'received:plane.gmane.org': 0.16; 'received:yi.org': 0.16; 'pointed': 0.19; 'written': 0.21; 'header :User-Agent:1': 0.23; 'subject:/': 0.26; 'header:X-Complaints- To:1': 0.27; "doesn't": 0.30; 'subject:other': 0.31; 'writes:': 0.31; 'file': 0.32; 'interface': 0.32; 'url:python': 0.33; 'case,': 0.35; 'doing': 0.36; 'charset:us-ascii': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'thank': 0.38; 'url:library': 0.38; 'to:addr:python-list': 0.38; 'help,': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'url:3': 0.61; 'skip:n 10': 0.64; 'facilities': 0.69; 'lack': 0.78; 'antoine.': 0.84; 'subject:read': 0.84; 'subject:Pair': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Antoine Pitrou <solipsis@pitrou.net>
Subject Re: Pair of filenos read/write each other?
Date Thu, 15 Aug 2013 18:24:05 +0000 (UTC)
References <mailman.552.1376435986.1251.python-list@python.org> <pan.2013.08.14.07.21.36.218000@nowhere.com> <loom.20130814T102738-513@post.gmane.org> <20130815161937.GA6494@kolibri>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host sea.gmane.org
User-Agent Loom/3.14 (http://gmane.org/)
X-Loom-IP 213.41.240.54 (Mozilla/5.0 (X11; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0)
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.606.1376591064.1251.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1376591064 news.xs4all.nl 15903 [2001:888:2000:d::a6]:60866
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52564

Show key headers only | View raw


Jack Bates <tdhfwh <at> nottheoilrig.com> writes:
> > 
> > An alternative is to use multiprocessing.Pipe():
> > http://docs.python.org/3.3/library/multiprocessing.html#multiprocessing.Pipe
> > 
> > In any case, Python doesn't lack facilities for doing what you want.
> 
> Thank you for your help, I need to satisfy an interface that requires a single
> file descriptor number that can be both read from and written to. Is it
> possible with any of the solutions you pointed out to get a single file
> descriptor number for each end?

Yes, it is what multiprocessing.Pipe() provides:
http://docs.python.org/3.3/library/multiprocessing.html#multiprocessing.Connection.fileno

Regards

Antoine.

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


Thread

Pair of filenos read/write each other? Jack Bates <tdhfwh@nottheoilrig.com> - 2013-08-13 16:10 -0700
  Re: Pair of filenos read/write each other? "Rhodri James" <rhodri@wildebst.demon.co.uk> - 2013-08-14 01:17 +0100
    Re: Pair of filenos read/write each other? Chris Angelico <rosuav@gmail.com> - 2013-08-14 01:55 +0100
    Re: Pair of filenos read/write each other? Jack Bates <tdhfwh@nottheoilrig.com> - 2013-08-15 08:56 -0700
    Re: Pair of filenos read/write each other? Jack Bates <tdhfwh@nottheoilrig.com> - 2013-08-15 08:59 -0700
  Re: Pair of filenos read/write each other? Roy Smith <roy@panix.com> - 2013-08-13 21:37 -0400
  Re: Pair of filenos read/write each other? Nobody <nobody@nowhere.com> - 2013-08-14 08:21 +0100
    Re: Pair of filenos read/write each other? Antoine Pitrou <solipsis@pitrou.net> - 2013-08-14 08:34 +0000
    Re: Pair of filenos read/write each other? Jack Bates <tdhfwh@nottheoilrig.com> - 2013-08-15 09:19 -0700
    Re: Pair of filenos read/write each other? Antoine Pitrou <solipsis@pitrou.net> - 2013-08-15 18:24 +0000

csiph-web