diff options
author | Facundo Batista <facundobatista@gmail.com> | 2005-01-07 02:50:22 (GMT) |
---|---|---|
committer | Facundo Batista <facundobatista@gmail.com> | 2005-01-07 02:50:22 (GMT) |
commit | bccc9a956a2f854db1c72392126d4a580dd1c830 (patch) | |
tree | 3b4c474b603ae8df571d0a4913cae29a0bd8f7c8 /Doc/lib/libos.tex | |
parent | 17a7924667f82896813ea1027c33e419dc3b642a (diff) | |
download | cpython-bccc9a956a2f854db1c72392126d4a580dd1c830.zip cpython-bccc9a956a2f854db1c72392126d4a580dd1c830.tar.gz cpython-bccc9a956a2f854db1c72392126d4a580dd1c830.tar.bz2 |
Added example to os.stat()
Diffstat (limited to 'Doc/lib/libos.tex')
-rw-r--r-- | Doc/lib/libos.tex | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/lib/libos.tex b/Doc/lib/libos.tex index d69c11c..b1c06b1 100644 --- a/Doc/lib/libos.tex +++ b/Doc/lib/libos.tex @@ -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 |