[docs] damn it .... Look at this function....

Georg Brandl georg at python.org
Sat Oct 6 19:20:05 CEST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 06.10.2012 18:51, schrieb 逸君曹:
> stat.S_IMODE(/mode/)
> 
> it output 493 when one file has permission settings 755 !!!!! it seems it
> directly output binary: 111,101,101 as a whole number!!!

Hi,

this can indeed be confusing.  The "755" mode you know is an *octal* number
which, converted to decimal, is the same as 493.  You can try it in Python:

>>> int('755', 8)
493

Hope that helps,
Georg

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlBwaEQACgkQN9GcIYhpnLCapwCfT9kBRoQ5FoXIaU1LrynD8g/7
ZM0AoJ6oJhJta8Ilvol8uSPOgj5/x7J2
=hhMO
-----END PGP SIGNATURE-----


More information about the docs mailing list