[Pythonmac-SIG] Python 2.3+Py23Compat/Python 2.4 compatibility problem
Bob Ippolito
bob at redivi.com
Wed May 4 21:48:03 CEST 2005
On May 4, 2005, at 3:21 PM, has wrote:
> Probably one for Bob, but there's an unpleasant disagreement
> between Py23Compat and Python 2.4 on where the LaunchServices, OSA,
> and other new 2.4 modules are located: the former installs them in
> individual directories of the same name under site-packages, the
> later keeps them at the top level of plat-mac/Carbon. This means
> scripts written on Python 2.3 break on 2.4 and vice-versa when
> importing any of these modules. What's the fix?
This is not a bug, you need to write your code such that it
accommodates for both:
try:
from LaunchServices import Launch, LaunchServices
except ImportError:
from Carbon import Launch, LaunchServices
-bob
More information about the Pythonmac-SIG
mailing list