How to convert a string like '777' to an octal integer like 0777?

KB kbchung at hongik.ac.kr
Sun Jul 31 04:04:30 EDT 2005


> The leading zero only exists in a particular string
> representation. os.chmod() needs an integer, not a string. 0777 == 511.

Thanks, Robert.

What you said is exactly what I did not understand clearly,
because I am just a beginner in Python programming.

KB




More information about the Python-list mailing list