On 20/08/2010 5:10 PM, vsoler wrote:
On Aug 20, 5:10 pm, Tim Golden<m...@timgolden.me.uk>  wrote:
To decode the permission bit-strings to vaguely meaningful
names:

<code>
import os, sys
from winsys import fs

dacl = fs.file (sys.executable).security ().dacl
for permission in dacl:
    print (d.trustee, " (Inherited )" if d.inherited else "")
    for name in fs.FILE_ACCESS.names_from_value (d.access):
      print ("  ", name)

</code>

TJG

it seems as though the definition of "d" is missing in your last piece
of code


Whoops, changed tack mid-thingy. Try:

dacl = ...
for d in dacl:
  # .. as before
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to