newbie - integer variable with leading zero for os.makedirs
Paul Rubin
http
Tue Dec 2 00:27:05 EST 2003
jtoher at cyllene.uwa.edu.au (james) writes:
> I've tried:
>
> permission = int('750', 8)
> mode = oct(permission)
>
> but this returns an octal string '0755' and os.makedirs barfs again.
> It really wants an integer and it really wants that leading zero. How
> can I assign a number with a leading zero to an integer variable?
Just say
permission = 0750
More information about the Python-list
mailing list