Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: 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; 'python.': 0.02; 'subject:file': 0.07; 'python': 0.09; 'explanation': 0.09; 'subject:Why': 0.09; 'subject:members': 0.09; 'underlying': 0.09; 'assume': 0.11; 'library': 0.15; 'represents': 0.15; 'did:': 0.16; 'structures,': 0.16; 'subject:group': 0.17; 'sender:addr:gmail.com': 0.18; 'mostly': 0.20; 'os,': 0.22; 'defined': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; "doesn't": 0.28; 'helpful.': 0.29; 'writes:': 0.29; 'worked': 0.30; 'url:python': 0.32; 'structure': 0.32; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'url:org': 0.36; 'modules': 0.36; 'url:library': 0.36; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'url:docs': 0.38; 'page': 0.38; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'email addr:gmail.com': 0.63; 'received:117': 0.75; 'message- id:@mx.google.com': 0.81; 'subject:tell': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:subject:in-reply-to:references:user-agent :date:message-id:mime-version:content-type; bh=619OGPU4BzUgqDXxHOwuqOpC+NluWGkyr76668heksw=; b=vdfDatuXcz3r3KseSuvVtvadO4bNDmDxoXR7omU66LB4qv+6XEo0pOxCrAtsVSbGnx b+pKxNzGmq/q5KXc4OEEvHGorVqH2TMpMJnWlXFogz0w4IyxRcYTjzAO96+lvfPRPKHS ozF5igV0fT/L238YIeTWCysfIVYIqFPH0J/9tB8nUPBmKDyF0HBVjvKmXhUvcOlMvJJn kXLWOl6moNKdRdBubouEi04UImiomtxdSVm8ocLphxrOktckiFPAp3/unyTFCmEHd0Fo Q6mouCyVqC8TfYKj7Ev+gK10PXq3zHTHshC1XPoUkKFDNk7tUYSMtSNtoAPDq8UQ4GQC t56Q== X-Received: by 10.68.209.170 with SMTP id mn10mr27055498pbc.11.1355987828326; Wed, 19 Dec 2012 23:17:08 -0800 (PST) Sender: Kushal Kumaran From: Kushal Kumaran To: python-list@python.org Subject: Re: Why does os.stat() tell me that my file-group has no members? In-Reply-To: References: <50d24afc$0$6955$e4fe514c@news2.news.xs4all.nl> User-Agent: Notmuch/0.14+83~gae459a3 (http://notmuchmail.org) Emacs/24.1.1 (x86_64-pc-linux-gnu) Date: Thu, 20 Dec 2012 12:46:55 +0530 MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355987831 news.xs4all.nl 6922 [2001:888:2000:d::a6]:36182 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35183 saqib.ali.75@gmail.com writes: > Thanks!! This was very helpful. It worked perfectly. > I had no clue about the intricacies of how python represents the group data from the underlying OS. > > This page doesn't go into to detailed explanation like you did: http://docs.python.org/2/library/grp.html > That's mostly because it represents the group data almost exactly as the underlying OS, including using the same structure member names as defined in pwd.h. The unix-specific modules often assume the user is familiar with the underlying library calls and data structures, and is looking for a way to use them from python. > -- regards, kushal