On May 4, 2005, at 6:38 AM, Wolfgang Keller wrote: >> On May 3, 2005, at 11:09 AM, Wolfgang Keller wrote: >> > > >>> has anyone already wrapped the getxattr(), setxattr(), >>> removexattr(), listxattr() functions on MacOS 10.4 for >>> Python? >>> > > >> I took a stab at it today. >> > > Hey, I had asked _whether_ someone has done it, I didn't ask you > _to_ _do_ _it_! ;-) > > >> Get the xattr package from pythonmac packages <http://pythonmac.org/ >> > packages/>> > > Shame on me, I don't even have MacOS X.4 yet. *drvvf* > > >> I don't expose getxattr, etc. as public API, because the options they >> take don't translate well to Python. Public API is simply an "xattr" >> type that you can wrap over a path or fd, and then it's used in a >> dict-like way. >> > > That's _exactly_ the way it should be done. :-) > > Dumb question: How about integrating it "officially" in the Macpython > distribution, so that all file objects on MacOS X.4 automatically have > an xattr dict?
Since that would be a feature addition, it wouldn't be able to integrate until Python 2.5 at the earliest. I don't really see the need to add platform-specific things to the file object though. No other platforms do it, and even the HFS stuff you can do with files needs to be done with Carbon.File, etc. In any case, I'd rather take all of the Mac specific stuff *out* of the Python standard library than put more in. -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig