Picking up resource forks and extended attributes on Mac OS X ?!

Miles semanticist at gmail.com
Sat Aug 30 12:24:13 EDT 2008


Mitrokhin wrote:
> Also (dare I ask for this too) If some nice soul could point me in the
> right direction for picking up files with extended attributes under OS
> X I'd be really gratefull to. Should it be done the same way, ie. via
> os. calls or perhaps by way of a popen or ... ?

Mac OS X 10.5 comes with a Python "xattr" package pre-installed, which
the xattr command-line utility is built on top of.  Furthermore, the
resource fork can be accessed as an extended attribute
(xattr.XATTR_RESOURCEFORK_NAME).  This might also be true of Mac OS X
10.4, but I don't recall for sure and I don't have access to it to
check.

-Miles



More information about the Python-list mailing list