[Baypiggies] stat.ST_BLKSIZE?

Chris Palmer chris at noncombatant.org
Sun Jan 22 02:50:25 CET 2006

Guido van Rossum writes:

> The value doesn't get returned as part of the 10-tuple, but it is
> available through the (newer) attribute-based API, as long as the
> underlying OS makes st_blksize available in its struct stat.

That does indeed work for me (Python 2.3.5 on Mac OS X). Wow, thanks!

Now I feel dumb. I see now that I could have learned about this feature
from <http://python.org/doc/2.4.2/lib/os-file-dir.html>.

Will this API ever be cleaned up, having only one return value with all
items visible? It's confusing to show a tuple but to also have a secret
object with more stuff in it. To me, the natural choice of return value
is a dictionary containing everything the underlying OS provides.

Anyway, thanks again.


More information about the Baypiggies mailing list