[ python-Bugs-1097229 ] Example needed in os.stat()

SourceForge.net noreply at sourceforge.net
Fri Jan 7 03:51:22 CET 2005


Bugs item #1097229, was opened at 2005-01-06 11:39
Message generated for change (Settings changed) made by facundobatista
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1097229&group_id=5470

Category: Documentation
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Facundo Batista (facundobatista)
Assigned to: Facundo Batista (facundobatista)
Summary: Example needed in os.stat()

Initial Comment:
As the repr() of an os.stat() object is *exactly* equal
to a tuple, it's not clear at first in the
documentation how to use its attributes:

>>> import os
>>> statinfo = os.stat('somefile.txt')
>>> statinfo
(33188, 422511L, 769L, 1, 1032, 100, 926L, 1105022698,
1105022732, 1105022732)
>>> statinfo.st_size
926L
>>>

So I propose to put this example in the stat docs.

----------------------------------------------------------------------

>Comment By: Facundo Batista (facundobatista)
Date: 2005-01-06 23:51

Message:
Logged In: YES 
user_id=752496

Changed the docs, commited to CVS.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2005-01-06 17:13

Message:
Logged In: YES 
user_id=21627

Sure, go ahead.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1097229&group_id=5470


More information about the Python-bugs-list mailing list