[Pythonmac-SIG] A couple of universal binary questions

Ronald Oussoren ronaldoussoren at mac.com
Tue Jun 6 19:08:13 CEST 2006


On 6-jun-2006, at 18:56, Michael Glassford wrote:


>
>>> What's the right way to detect within the application whether its
>>> running on an Intel or a PowerPC Mac? I can figure out a way on  
>>> my own
>>> (such as looking at sys.byteorder), but I wonder if there's an
>>> "official" way.
>>
>> The right way to detect is to not detect at all.
>
> I realize that's generally preferable, but...
>
>> Otherwise, it depends on what reason you're doing it.
>
> I'm experimenting with getting Psyco working in the application, and
> obviously only want to enable it if I'm running on an Intel  
> machine. It
> may turn out to do this check on its own; at the moment I can't tell,
> because enabling it automatically crashes my application on both Intel
> and PowerPC Macs.

Even here I wouldn't test for the architecture but would just import  
psyco and act on the success or failure of that.

Ronald


More information about the Pythonmac-SIG mailing list