Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.016 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:question': 0.08; 'python': 0.09; 'function:': 0.09; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'wrote:': 0.17; 'instance': 0.17; '>>>': 0.18; 'skip:p 30': 0.20; 'python?': 0.20; 'question.': 0.20; 'sort': 0.21; 'help.': 0.22; 'defined': 0.22; 'this:': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; '>>>>': 0.29; 'dictionary': 0.29; 'received:192.168.1.3': 0.29; 'skip:_ 10': 0.29; 'class': 0.29; "i'm": 0.29; 'file': 0.32; 'received:84': 0.32; 'print': 0.32; 'to:addr:python-list': 0.33; 'thanks': 0.34; 'list': 0.35; 'something': 0.35; 'but': 0.36; 'far': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'skip:" 10': 0.40; 'received:192.168': 0.40; 'teaching': 0.66; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'dumb': 0.84; 'reply-to:addr:python.org': 0.84; 'type(s)': 0.84 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.0 cv=IekFqBWa c=1 sm=1 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=lR6CHUT36vYA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=zYmRYhyKFbEA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=zU2Si37B1V_A2UuGUmYA:9 a=wPNLvfGTeEIA:10 a=0nF1XD0wxitMEM03M9B4ZQ==:117 X-AUTH: mrabarnett:2500 Date: Thu, 30 Aug 2012 13:14:57 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Beginners question References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: python-list@python.org 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1346328894 news.xs4all.nl 6941 [2001:888:2000:d::a6]:56602 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:28105 On 30/08/2012 12:54, boltar2003@boltar.world wrote: > Hello > > I'm slowly teaching myself python so apologies if this is a dumb question. > but something has confused me with the os.stat() function: > >>>> s = os.stat(".") >>>> print s > posix.stat_result(st_mode=16877, st_ino=2278764L, st_dev=2053L, st_nlink=2, st_u > id=1000, st_gid=100, st_size=4096L, st_atime=1346327745, st_mtime=1346327754, st > _ctime=1346327754) > > What sort of object is posix.stat_result? Its not a dictionary or list or a > class object as far as I can tell. Thanks for any help. > What don't you ask Python? I'm sure you'' get something like this: >>> type(s) In other words, it's an instance of the class "stat_result" as defined in the file "posix.py". On my system I get "" because I'm using Windows.