Re: [Pyobjc-dev] Re: Structs, tuples and instances
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-10-31 16:31:03
|
On Oct 31, 2003, at 11:19 AM, Jack Jansen wrote: > > On 31 Oct 2003, at 15:14, Michael Hudson wrote: > >> Ronald Oussoren <ous...@ci...> writes: >> >>> On 31 okt 2003, at 11:54, Jack Jansen wrote: >>> >>>> Hmm, even if it isn't available from Python the objc core could make >>>> it available. Using structmember for the various toolbox structures >>>> is something that's also on my to-do list, but I haven't done >>>> anything about it yet so I don't know how feasible this approach is. >>> >>> Do you mean the new PyStructSequence_Type as used by os.stat and >>> time.localtime? >> >> Ah, that would be more likely than what he actually said :-) > > Right:-) > >>> Those "structures" are (sadly) read-only. I'm thinking of ... >> >> If you do do something about this, it might be worth offering a patch >> to Python itself; tcgetattr at least could use such functionality. > > I'd love that... As I said I could put it to good use for the various > Mac toolbox objects. While you're thinking about Mac toolbox objects, how about making FSSpec / FSRef / FSAlias easier to use? Personally, I think it would be killer if I could str(fsSpec) and get the utf8 path out of it (or unicode(fsSpec) and get the unicode path out of it). Thinking aloud here, I'm really liking the signatures. It allows me to fix PyObjC methods without recompiling (if I want to), and they're pretty easy to understand (after looking at a lot of them). I wish bgen wrapped modules had this kind of capability (but then we'd almost have ctypes). -bob |