]> granicus.if.org Git - python/commitdiff
Added example to os.stat()
authorFacundo Batista <facundobatista@gmail.com>
Fri, 7 Jan 2005 02:50:22 +0000 (02:50 +0000)
committerFacundo Batista <facundobatista@gmail.com>
Fri, 7 Jan 2005 02:50:22 +0000 (02:50 +0000)
Doc/lib/libos.tex

index d69c11cfdca341dc83586ba82d7365bf8d5558b7..b1c06b1fa2ba5430661514ffe6243f8245bdeea1 100644 (file)
@@ -931,7 +931,17 @@ the \ctype{stat} structure, namely:
 \member{st_mtime} (time of most recent content modification),
 \member{st_ctime}
 (platform dependent; time of most recent metadata change on \UNIX, or
-the time of creation on Windows).
+the time of creation on Windows):
+
+\begin{verbatim}
+>>> import os
+>>> statinfo = os.stat('somefile.txt')
+>>> statinfo
+(33188, 422511L, 769L, 1, 1032, 100, 926L, 1105022698,1105022732, 1105022732)
+>>> statinfo.st_size
+926L
+>>>
+\end{verbatim}
 
 \versionchanged [If \function{stat_float_times} returns true, the time
 values are floats, measuring seconds. Fractions of a second may be