Hello,
I'm writing a backup rsync script in python (who hasn't?), but I want
to be able to specify directories and files to exclude in the backup
based on the file/folder's label color in the finder. I don't know
anything about Carbon but I managed to scrape together code to read
the label color of files:
def getFileLabel(path):
filespec = Carbon.File.FSSpec(path)
if not os.path.isdir(path):
finfo = filespec.FSpGetFInfo()
else:
finfo = filespec.FSpGetFInfo()
return labels[getLabelNumber(finfo.Flags)]
The problem is that this doesn't work on directories. Is there a way
I can read the label on folders from python?
Thanks.
By the way, if anybody wants my script when I'm done with it just mail
me and I'll send you a copy.
--
Caleb Land
([EMAIL PROTECTED])
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig