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


Groups > comp.lang.python > #29529

Re: How to get the list of all my open file(descriptor)s and locks?

Path csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:file': 0.07; 'subject:How': 0.09; 'descriptor': 0.09; 'sep': 0.09; 'sockets': 0.09; 'sure,': 0.09; "(i'm": 0.16; 'pipes': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'exists': 0.17; 'seems': 0.23; 'header:In-Reply- To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'subject:list': 0.28; 'subject:all': 0.29; 'mode': 0.30; 'file': 0.32; 'getting': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'too': 0.36; 'does': 0.37; 'received:209': 0.37; 'well.': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; "you'll": 0.62; 'subject:get': 0.81; 'to:name:python': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=/hJTRUdnC9SXVBSujvkxZ5DqcGIFPRoV99ucOrR2JCQ=; b=Ld6ni5O80ZnSTCJoHgU2PmERDypXaIr6MZPSom8xpgCip80md8Yw9kYsq06Gm1liZ1 R7ccEo1PnygLbQCUQ0kEM4YcxRAqqtfEK6J6dW5xzMQSrh2F0ILy1bZfp7E/mM9ReRIu 7x0139dJJk3UjvmI8OrxOvqJPOyvhHaITdSzvUwz/dbQax8yyXY7bX4szGcUGE4wODML Hpqjg13IBf8ucIGZefvFIf30klkbkTHk+VSgYmszy1o4C1fAcHj6FAeWmGtY+KxtbET/ yH63KuGpwAeIK+ZmDGdrFHLB/4Wqzho4bHTp1drAr9BYyuQGuTjJQV+qkh3EQOATRnHb 0WsA==
MIME-Version 1.0
In-Reply-To <CANXECd5LoiO_19dAF2UapPWE0HfZ=faGao_v9-dGwYvpOdPA2Q@mail.gmail.com>
References <CANXECd56v1aefBgEeFv6=96w9ooM-HyjbpvE+d2SaZpRXhX7Mg@mail.gmail.com> <CANXECd5LoiO_19dAF2UapPWE0HfZ=faGao_v9-dGwYvpOdPA2Q@mail.gmail.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Wed, 19 Sep 2012 15:40:11 -0600
Subject Re: How to get the list of all my open file(descriptor)s and locks?
To Python <python-list@python.org>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
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.943.1348090842.27098.python-list@python.org> (permalink)
Lines 8
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348090842 news.xs4all.nl 6981 [2001:888:2000:d::a6]:56178
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29529

Show key headers only | View raw


On Wed, Sep 19, 2012 at 2:36 PM, Ismael Farfán <sulfurfff@gmail.com> wrote:
> It seems like I can use os.fstat to find out if a fd exists and also
> get it's type and mode (I'm getting some pipes too : )

Sure, because files and pipes both use the file descriptor
abstraction.  If your process does any networking, you'll find sockets
in there as well.

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


Thread

Re: How to get the list of all my open file(descriptor)s and locks? Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-19 15:40 -0600

csiph-web