This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Example needed in os.stat()
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: facundobatista Nosy List: facundobatista, loewis
Priority: normal Keywords:

Created on 2005-01-06 14:39 by facundobatista, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg23876 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2005-01-06 14:39
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.
msg23877 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-01-06 20:13
Logged In: YES 
user_id=21627

Sure, go ahead.
msg23878 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2005-01-07 02:51
Logged In: YES 
user_id=752496

Changed the docs, commited to CVS.
History
Date User Action Args
2022-04-11 14:56:09adminsetgithub: 41403
2005-01-06 14:39:21facundobatistacreate