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


Groups > comp.lang.python > #28105

Re: Beginners question

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 <python@mrabarnett.plus.com>
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 <python@mrabarnett.plus.com>
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 <k1nk8s$3l4$1@speranza.aioe.org>
In-Reply-To <k1nk8s$3l4$1@speranza.aioe.org>
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 <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.3964.1346328894.4697.python-list@python.org> (permalink)
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

Show key headers only | View raw


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)
<class 'posix.stat_result'>

In other words, it's an instance of the class "stat_result" as defined
in the file "posix.py".

On my system I get "<class 'nt.stat_result'>" because I'm using Windows.

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


Thread

Beginners question boltar2003@boltar.world - 2012-08-30 11:54 +0000
  Re: Beginners question MRAB <python@mrabarnett.plus.com> - 2012-08-30 13:14 +0100
    Re: Beginners question Roy Smith <roy@panix.com> - 2012-08-30 08:23 -0400
    Re: Beginners question boltar2003@boltar.world - 2012-08-30 12:50 +0000
      Re: Beginners question Chris Angelico <rosuav@gmail.com> - 2012-08-30 23:06 +1000
        Re: Beginners question boltar2003@boltar.world - 2012-08-30 13:16 +0000
      Re: Beginners question Dave Angel <d@davea.name> - 2012-08-30 09:23 -0400
      Re: Beginners question Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2012-08-30 14:30 +0100
      Re: Beginners question Terry Reedy <tjreedy@udel.edu> - 2012-08-30 14:22 -0400
  Re: Beginners question Dave Angel <d@davea.name> - 2012-08-30 08:25 -0400
    Re: Beginners question boltar2003@boltar.world - 2012-08-30 12:53 +0000
  Re: Beginners question Chris Angelico <rosuav@gmail.com> - 2012-08-30 22:32 +1000
  Re: Beginners question Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-08-30 14:49 +0200
    Re: Beginners question Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-08-30 16:41 +0200
    Re: Beginners question Hans Mulder <hansmu@xs4all.nl> - 2012-08-30 17:38 +0200
  Re: Beginners question charvigroups@gmail.com - 2012-09-04 23:28 -0700
    Re: Beginners question Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-05 09:03 +0100
    Re: Beginners question Dave Angel <d@davea.name> - 2012-09-05 09:21 -0400

csiph-web