Re: [Pythonmac-SIG] str.decode() behaves differently in 2.5 and 2.6

2008-10-15 Thread has
On 12 Oct 2008, at 14:27, Just van Rossum wrote: It seems as if 2.5 uses native byte order by default, and 2.6 big endian (if there's no Byte Orde Mark). Maybe a bug, maybe a bug fix, I don't know :). In the meantime, just use 'utf-16be' or 'uft-16le' explicitly or make sure there's a BOM.

[Pythonmac-SIG] Speech Recognition example (was Re: Example of stand-alone NSRunLoop)

2008-10-15 Thread Joe Strout
Thanks, Jack and Ronald. Using currentRunLoop() or mainRunLoop() makes it the run loop work. I found that I also needed to call setListensInForegroundOnly_(False), since a simple terminal app is never considered to be in the foreground, and so would not otherwise be able to listen. With

Re: [Pythonmac-SIG] Example of stand-alone NSRunLoop?

2008-10-15 Thread Ronald Oussoren
On Wednesday, October 15, 2008, at 11:25AM, "Jack Jansen" <[EMAIL PROTECTED]> wrote: > >On 15 okt 2008, at 05:34, Joe Strout wrote: >> # Now we need a NSRunLoop... >> runLoop = NSRunLoop.alloc() # note: no init() method? This is definitely wrong, you must always call some kind of init method a

Re: [Pythonmac-SIG] Example of stand-alone NSRunLoop?

2008-10-15 Thread Jack Jansen
On 15 okt 2008, at 05:34, Joe Strout wrote: # Now we need a NSRunLoop... runLoop = NSRunLoop.alloc() # note: no init() method? runLoop.run() I think allocating a runloop is hardly ever what you need: there's one already, and you want to get that: runLoop = NSRunLoop.mainRunLoop() This