[Pythonmac-SIG] Docs for Carbon.file??
Chris Barker
Chris.Barker at noaa.gov
Wed Jul 30 16:21:04 EDT 2003
Hi folks,
Are there any docs for the Carbon.File module (and the rest of the
Carbon Package).
I'm not much of a mac programmer (Python is the only language I've ever
programmed on the Mac with), so all this Mac stuff is a mystery to me.
In any case, I need to set the type and creator of a file just created
by my program. Poking around, I found that this appears to work:
import Carbon.File
mac_file = Carbon.File.FSSpec(filepath)
info = mac_file.FSpGetFInfo()
info.Creator = "COSM"
info.Type = ".SAV"
mac_file.FSpSetFInfo(info)
I figured this out by trying things out, I couldn't find any docs. What
I have seems to work, but it also seems a whole lot clunkier that it
should be. Is there an easier way?
I'd love to see a:
Carbon.File.SetType( filepath, type)
or something like that.
-Chris
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Pythonmac-SIG
mailing list