Re: [Pythonmac-SIG] Read Strings from Resources

2004-12-23 Thread Larry Bugbee
For the useless? trivia department... So it looks like a 2-byte count followed by an array of Pascal strings. Ah yes. And now that I see this I seem to remember that the pstrings are padded to a 2-byte boundary. Hmmm, I'd be a bit surprised if there was such alignment padding. Pascal string lengths

Re: [Pythonmac-SIG] Read Strings from Resources

2004-12-22 Thread Just van Rossum
wicked witch wrote: > >>>So it looks like a 2-byte count followed by an array of Pascal > >>>strings. > >> > >>Ah yes. And now that I see this I seem to remember that the pstrings > >>are padded to a 2-byte boundary. > > > > Hmmm, I'd be a bit surprised if there was such alignment padding. > > Pa

Re: [Pythonmac-SIG] Read Strings from Resources

2004-12-22 Thread wicked witch
Opstad, Dave schrieb: On 12/22/04 1:51 AM, "Jack Jansen" <[EMAIL PROTECTED]> wrote: On 22 Dec 2004, at 00:22, Opstad, Dave wrote: According to MacTypes.r (in the last Universal Headers revision), the Rez format for a 'STR#' resource is as follows: type 'STR#' { integer = $$

Re: [Pythonmac-SIG] Read Strings from Resources

2004-12-22 Thread Opstad, Dave
On 12/22/04 1:51 AM, "Jack Jansen" <[EMAIL PROTECTED]> wrote: > On 22 Dec 2004, at 00:22, Opstad, Dave wrote: > >> According to MacTypes.r (in the last Universal Headers revision), the >> Rez format for a 'STR#' resource is as follows: >> >> >> type 'STR#' { >>integer =

Re: [Pythonmac-SIG] Read Strings from Resources

2004-12-22 Thread Jack Jansen
On 22 Dec 2004, at 00:22, Opstad, Dave wrote: I've filed a bug report (#1089399), so it'll be fixed, but that's a long term thing (not before 2.5). In the short term you'll have to parse the STR# resource yourself. I'm not 100% sure, but I think they're just a null-byte separated list. If they're s

RE: [Pythonmac-SIG] Read Strings from Resources

2004-12-21 Thread Opstad, Dave
> I've filed a bug report (#1089399), so it'll be fixed, but that's a > long term thing (not before 2.5). In the short term you'll have to > parse the STR# resource yourself. I'm not 100% sure, but I think > they're just a null-byte separated list. If they're something else (a > list of Pascal stri

Re: [Pythonmac-SIG] Read Strings from Resources

2004-12-21 Thread Jack Jansen
On 20-dec-04, at 20:06, [EMAIL PROTECTED] wrote: I working on a project, where I want to read a STR# resource and write it into an xml file. With Carbon.Res I can easily access the file an read the string Resources for each ID. But with the Res.Get1Resource('STR#', id).data I get all the strings

[Pythonmac-SIG] Read Strings from Resources

2004-12-20 Thread wicked-witch
I working on a project, where I want to read a STR# resource and write it into an xml file. With Carbon.Res I can easily access the file an read the string Resources for each ID. But with the Res.Get1Resource('STR#', id).data I get all the strings in the list in one string only. Is there a metho