On 12 Mar, 2011, at 19:28, Brendan Simon (eTRIX) wrote:

> 
> 
> On 11/03/11 10:04 AM, Brendan Simon (eTRIX) wrote:
>> NOTE: for some reason the AppleEvent constants kAEInternetSuite and
>> kAEISGetURL does not work as they are set to 'gurl' (lowercase). 
>> However using 'GURL' does work :)
>> 
>> Cheers, Brendan.
> 
> Was thinking it may be "nicer" to convert the constants to upper case
> rather than having a magic string ??
> 
> -            AE.AEInstallEventHandler('GURL', 'GURL', self.__geturl)
> +            AE.AEInstallEventHandler(kAEInternetSuite.upper(), 
> kAEISGetURL.upper(), self.__geturl)
> 
> 
> -            AE.AERemoveEventHandler('GURL', 'GURL')
> +            AE.AERemoveEventHandler(kAEInternetSuite.upper(), 
> kAEISGetURL.upper())

I'd prefer to keep the hardcoded literals for now, that makes it clear that the 
definition in the stdlib is wrong.

The current code doesn't work in python3, as the entire Carbon package is not 
present there. I will therefore rewrite argv_emulation.py using ctypes in the 
near future and then this issue entirely goes away ;-)

Ronald

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to