On May 4, 2005, at 4:50 PM, has wrote: > Bob wrote: > > >>> Probably one for Bob, but there's an unpleasant disagreement >>> between Py23Compat and Python 2.4 [which] 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, >> > > Maybe not, but it's hardly good design either. Any time I wish for > gratuitous complexity or broken-by-design-ness I can easily use > Perl or AppleScript instead. :p > >> try: >> from LaunchServices import Launch, LaunchServices >> except ImportError: >> from Carbon import Launch, LaunchServices >> > > I figured that, but I'd rather hoped a more elegant solution might > be forthcoming at source. Is there a good reason why they couldn't > both agree on a common location, or at least provide the relevant > aliases in 2.4 to preserve Python's much-vaunted backwards > compatibility?
This is *FORWARDS* compatibility, not backwards. Forwards compatibility is always messy. You have three options: 1) Work around it 2) Require Python 2.4 3) Require the "non-standard-library" components even on 2.4 Pick one, there's nothing that can be done about it. -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig