[Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread gandreas
So I'm reworking how debugging is handled in PyOXIDE and I've come to a problem (several, but this is the biggy for the morning).My goal is to separate interacting with the (remote) debugged client in a separate thread, which forwards messages to the main thread as needed to run the debugger UI (si

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 12:35 PM, [EMAIL PROTECTED] wrote: > So I'm reworking how debugging is handled in PyOXIDE and I've come > to a problem (several, but this is the biggy for the morning). > > My goal is to separate interacting with the (remote) debugged > client in a separate thread, which f

Re: [Pythonmac-SIG] convert binary plist to xml string

2005-05-16 Thread Bill Janssen
> first, second, third, fourth, fifth, . = struct.unpack > ("iiIIiIiiILllfd", data) > > It is SO EASY to screw this up. Pick the wrong type code, or > misalign the type and field. It needs to look more like something sane: > > class Point(struct.BigEndianStruct): > x = struct.SInt32(

Re: [Pythonmac-SIG] convert binary plist to xml string

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 1:31 PM, Bill Janssen wrote: >> first, second, third, fourth, fifth, . = struct.unpack >> ("iiIIiIiiILllfd", data) >> >> It is SO EASY to screw this up. Pick the wrong type code, or >> misalign the type and field. It needs to look more like something >> sane: >> >> cla

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread gandreas
On May 16, 2005, at 11:59 AM, Bob Ippolito wrote: > > On May 16, 2005, at 12:35 PM, [EMAIL PROTECTED] wrote: > > >> So I'm reworking how debugging is handled in PyOXIDE and I've come >> to a problem (several, but this is the biggy for the morning). >> >> My goal is to separate interacting with

Re: [Pythonmac-SIG] convert binary plist to xml string

2005-05-16 Thread Bill Janssen
Pascal data structures?! Bill ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 2:01 PM, [EMAIL PROTECTED] wrote: > On May 16, 2005, at 11:59 AM, Bob Ippolito wrote: > > >> On May 16, 2005, at 12:35 PM, [EMAIL PROTECTED] wrote: >> >>> So I'm reworking how debugging is handled in PyOXIDE and I've come >>> to a problem (several, but this is the biggy for th

Re: [Pythonmac-SIG] convert binary plist to xml string

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 2:08 PM, Bill Janssen wrote: > Pascal data structures?! Have you ever looked at the Carbon/QuickTime APIs? I guess not. Mac OS past was originally written with Pascal calling conventions and pascal strings (unsigned char length prefixed strings), so you see them all o

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread gandreas
On May 16, 2005, at 1:22 PM, Bob Ippolito wrote: > > On May 16, 2005, at 2:01 PM, [EMAIL PROTECTED] wrote: >>> >> >> The debugged app works like that, but the way that the "remote >> object" interface works is also designed to use sync TCP on the host >> side. Since it's pure python, I didn't wan

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Ronald Oussoren
On 16-mei-2005, at 20:01, [EMAIL PROTECTED] wrote: So, it appears that performSelectorOnMainThread needs some way to release the lock to let Python code in the main thread be executed. Any suggestions for workarounds? Update to PyObjC from svn and see if that makes a difference. Can't do that -

Re: [Pythonmac-SIG] convert binary plist to xml string

2005-05-16 Thread Bill Janssen
> > On May 16, 2005, at 2:08 PM, Bill Janssen wrote: > > > Pascal data structures?! > > Have you ever looked at the Carbon/QuickTime APIs? I guess not. Nope. > Mac OS past was originally written with Pascal calling conventions and > pascal strings (unsigned char length prefixed strings), so

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Ronald Oussoren
On 16-mei-2005, at 20:53, [EMAIL PROTECTED] wrote: NO! That is really really horribly bad to do. Working around a bug in PyObjC by writing code that will break in correct versions of PyObjC is absolutely horrible. You should NEVER release the lock unless you own it. Here, then, is probably the

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 2:53 PM, [EMAIL PROTECTED] wrote: > > On May 16, 2005, at 1:22 PM, Bob Ippolito wrote: > > >> >> On May 16, 2005, at 2:01 PM, [EMAIL PROTECTED] wrote: >> >>> The debugged app works like that, but the way that the "remote >>> object" interface works is also designed to use sync

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread gandreas
On May 16, 2005, at 2:12 PM, Ronald Oussoren wrote: > > On 16-mei-2005, at 20:53, [EMAIL PROTECTED] wrote: > >>> >>> NO! That is really really horribly bad to do. Working around a >>> bug in PyObjC by writing code that will break in correct versions >>> of PyObjC is absolutely horrible. You sh

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Ronald Oussoren
On 16-mei-2005, at 21:28, [EMAIL PROTECTED] wrote: On May 16, 2005, at 2:12 PM, Ronald Oussoren wrote: On 16-mei-2005, at 20:53, [EMAIL PROTECTED] wrote: NO! That is really really horribly bad to do. Working around a bug in PyObjC by writing code that will break in correct versions of PyObjC is

[Pythonmac-SIG] Python 2.4, test_long failing?

2005-05-16 Thread Ronald Oussoren
I'm building Python 2.4.1 from source (--enable-framework) and noticed that test_long is failing. Is anyone having this problem? $ sw_vers ProductName:Mac OS X ProductVersion: 10.4 BuildVersion: 8A428 $ make test ... test_long test test_long failed -- 9007199254740991.0 9007199254740991L 0

Re: [Pythonmac-SIG] Python 2.4, test_long failing?

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 3:44 PM, Ronald Oussoren wrote: > I'm building Python 2.4.1 from source (--enable-framework) and > noticed that test_long is failing. Is anyone having this problem? > > $ sw_vers > ProductName:Mac OS X > ProductVersion: 10.4 > BuildVersion: 8A428 > > $ make test > ...

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread gandreas
On May 16, 2005, at 2:39 PM, Ronald Oussoren wrote: > > On 16-mei-2005, at 21:28, [EMAIL PROTECTED] wrote: > >> The problem isn't the Cocoa threads (Cocoa knows that the >> application is multithreaded). The problem is that the python >> code that is executing in a threading.Thread calls

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread gandreas
On May 16, 2005, at 2:22 PM, Bob Ippolito wrote: > > On May 16, 2005, at 2:53 PM, [EMAIL PROTECTED] wrote: > >> I should be able to directly send the signal from the IDE to the >> targeted app (since it's a child of the IDE), and the standard >> "catch a unix signal invokes the debugger" act

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 4:29 PM, [EMAIL PROTECTED] wrote: > On May 16, 2005, at 2:39 PM, Ronald Oussoren wrote: > > >> On 16-mei-2005, at 21:28, [EMAIL PROTECTED] wrote: >> >> >>> The problem isn't the Cocoa threads (Cocoa knows that the >>> application is multithreaded). The problem is that the

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 4:32 PM, [EMAIL PROTECTED] wrote: > > On May 16, 2005, at 2:22 PM, Bob Ippolito wrote: > > >> >> On May 16, 2005, at 2:53 PM, [EMAIL PROTECTED] wrote: >> >> >>> I should be able to directly send the signal from the IDE to the >>> targeted app (since it's a child of the IDE),

Re: [Pythonmac-SIG] Python threading.Thread vs PyObjC performOnMainThread

2005-05-16 Thread Jack Nutting
> > Including an entire "custom" version of Python just seems like a > > bad solution to me. It may be the only solution, depending on > > various other circumstances, but it seems kind of sad to say "well, > > OS X ships with Python.framework, but it can't be used to write a > > Python IDE". > >

[Pythonmac-SIG] AddressBook Question.

2005-05-16 Thread Joe Duhamel
All, I know this is a novice question but I'm trying to create a new group using the python pyobjc module. I'm ure I've made a juvenile mistake but help would be appreciated. -Joe if undefined is None: undefined = ABGroup.alloc().init() undefined.setValueForProperty_("GroupNa

Re: [Pythonmac-SIG] AddressBook Question.

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 7:56 PM, Joe Duhamel wrote: > All, > I know this is a novice question but I'm trying to create a new group > using the python pyobjc module. I'm ure I've made a juvenile mistake > but help would be appreciated. > > > -Joe > > if undefined is None: > undefined = ABGroup.

Re: [Pythonmac-SIG] Python 2.4, test_long failing?

2005-05-16 Thread Bob Ippolito
On May 16, 2005, at 3:58 PM, Bob Ippolito wrote: > > On May 16, 2005, at 3:44 PM, Ronald Oussoren wrote: > > >> I'm building Python 2.4.1 from source (--enable-framework) and >> noticed that test_long is failing. Is anyone having this problem? >> >> $ sw_vers >> ProductName:Mac OS X >> Produc

Re: [Pythonmac-SIG] AddressBook Question.

2005-05-16 Thread Bob Ippolito
Yeah, that is the correct argument order, I wasn't paying attention to the arguments, I copied those in the order you wrote them. The name of the selector and the syntax were what I noticed as being obviously wrong. I highly suggest you read the Introduction to PyObjC document until you u

Re: [Pythonmac-SIG] Python Interest Group Query

2005-05-16 Thread Lee Cullens
Python Interest Group Query I'm aware of the Boston PIG, a smaller one in Amherst and have been told that there is possibly a PIG in Manchester, NH. Basically I'm trying to find out if there are any, or any interest in (or even any other Python users at all :~)) in a PIG in the northern NE