Nick Craig-Wood wrote: > Peter Otten <[EMAIL PROTECTED]> wrote: >> vj wrote: >> >> > How do I do the following unix command: >> > >> > mkdir -m770 test >> > >> > with the os.mkdir command. Using os.mkdir(mode=0770) ends with the >> > incorrect permissions. >> >> mkdir() works just like its C equivalent, see >> http://docs.python.org/dev/lib/os-file-dir.html: >> >> "Where it is used, the current umask value is first masked out." >> >> Use os.chmod() after os.mkdir() to get the desired permissions. > > I think you meant use os.umask(0) before the os.mkdir() ?
No, I didn't. What is the difference/advantage of that approach? Peter -- http://mail.python.org/mailman/listinfo/python-list