weird problem with os.chmod

Peter Hansen peter at engcorp.com
Fri Nov 11 21:26:34 EST 2005


Mike Meyer wrote:
> Strange that int doesn't recognize the leading 0. But you can use the
> second argument to int:
> 
>>>>int("0600", 16)
> 
> 1536

You can use it another way too:

 >>> int('0600', 0)
384
 >>> int('0x180', 0)
384
 >>> 0600
384

-Peter



More information about the Python-list mailing list