Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Monkaaay

macrumors 6502
Original poster
Jun 19, 2006
258
0
Richmond, VA
If I take advantage of xcode 3 and develop an application in Python/Cocoa, will it work on 10.4 or will it require 10.5?
 

Alloye

macrumors 6502a
Apr 11, 2007
657
0
Rocklin, CA
That depends on whether or not you use any Cocoa features that are specific to 10.5. In addition, Tiger users would need PyObjC and possibly an updated Python interpreter included with the app.
 

hhas

macrumors regular
Oct 15, 2007
126
0
If I take advantage of xcode 3 and develop an application in Python/Cocoa, will it work on 10.4 or will it require 10.5?

If you want portability between Tiger and Leopard, you'll need to install your own Python framework and develop with that (there's a binary installer for 2.5.1 on http://www.python.org) and PyObjC (a 1.4 installer is available, or you can find 2.0 in the PyObjC repository).

To build a standalone application bundle containing a stripped-down interpreter and all dependencies, use py2app. Note that this will add approx 4MB to your .dmg/.zip distribution - basically a non-issue for broadband users and usually tolerable for dialup users.

Obviously you'll need to avoid using Leopard-only OS features, at least when your application is running on Tiger. If you want to take advantage of Leopard features when available, you could always do a version check at launch and enable/disable the relevant sections of code as needed. You might also be able to find third-party Python and/or Cocoa libraries that provide equivalent features.

If you'd like to see a typical example of a standalone PyObjC app, take a look at the ASDictionary application on the appscript downloads page (source is also available in svn). You might also want to subscribe to the PythonMac-SIG mailing list if you've not already done so.

HTH
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.