file mode attributes...

Martin v. Löwis loewis at informatik.hu-berlin.de
Sun Sep 15 14:00:27 EDT 2002


"Bjorn Pettersen" <BPettersen at NAREX.com> writes:

> I was wondering if this was the best way of implmenting these functions
> (windows)?

Yes.

> It seems rather round-about, especially since the stat attributes I'm
> using aren't even mentioned in the manual...

On Unix, you'd normally add S_IRGRP|S_IROTH as well. Permissions, on
Unix, are really a bitmap thing, so manipulating them takes place most
naturally using bitmap operations.

Notice that, on WNT/2k/XP, you might also need to modify the access
control list to give users permissions, especially if the files are on
NTFS. Access and modification of the ACL is not supported in standard
Python.

Regards,
Martin



More information about the Python-list mailing list