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

Chirone

macrumors 6502
Original poster
Mar 2, 2009
279
0
NZ
Just thought I'd make an app where you can control stuff with apple scripting when I came across the idea of PyObjC, but going to pyobjc.sourceforge.net shows it hasn't been updated since late 2009.

Does anyone know if pyobjc is still a valid thing to use?

also, does anyone know if you can write the core of your application in objc and c/c++ and then use apple script obj c to build the interface for it?
 
Just thought I'd make an app where you can control stuff with apple scripting when I came across the idea of PyObjC, but going to pyobjc.sourceforge.net shows it hasn't been updated since late 2009.

Does anyone know if pyobjc is still a valid thing to use?

Not if you want to use Python 3.

also, does anyone know if you can write the core of your application in objc and c/c++ and then use apple script obj c to build the interface for it?

Yes, on Apple systems there is something called Objective-C++.

http://en.wikipedia.org/wiki/Objective-C#Objective-C.2B.2B
 
Just thought I'd make an app where you can control stuff with apple scripting when I came across the idea of PyObjC, but going to pyobjc.sourceforge.net shows it hasn't been updated since late 2009.

Does anyone know if pyobjc is still a valid thing to use?

Yes, Python-ObjC still works very well. I use it in a number of my scripts to work with Plists, and to call ObjC methods.

Apple has shipped Python-ObjC bindings in their OSs for quite some time now, so nothing more is needed for at least 10.5+. The bindings for Python and Ruby are well maintained, while the Perl ones seem to be lagging. It should also be noted that MacRuby ships standard with Lion as well (very exciting direction there... even though I am not a ruby programmer).

Note that if you want templates to create Python-ObjC, Ruby-ObjC, or Perl-ObjC applications you are going to have to dig them up from the open-source projects, as Apple has discontinued those templates in XCode. I have not tried on XCode 4, but in later versions of XCode 3 you could still drop the template files into place and they would just work.

Not if you want to use Python 3.

I don't know why you bring up Python 3. Lion does not include Python 3, and there are no Python-ObjC bindings for Python 3 that I am aware of from anywhere.

also, does anyone know if you can write the core of your application in objc and c/c++ and then use apple script obj c to build the interface for it?

Technically this is probably possible, but this would be an astoundingly bad decision to go that way. The methods to bind ObjC through XCode are a pure pleasure to use. Everything else is work.
 
MorphingDragon: noted, thanks

larkost: thanks, that's good to know.

I shall explore python-objc now
 
I don't know why you bring up Python 3. Lion does not include Python 3, and there are no Python-ObjC bindings for Python 3 that I am aware of from anywhere.
Actually... I think you'll be pleasantly surprised regarding Lion and Python 3. Typing:
Code:
python3
... at a Terminal prompt gives me the good old Python 3.2.1 console, at least in Lion. This did not work in Snow Leopard... oh, and Python 2.7.1 is installed in Lion too (but not Python 2.7.2, which arrived too late for Apple to include).

I did install Python 3.2.1 from python.org at the time I tested, but did not elect to update the shell profile... which to me suggests that there is indeed Python 3 support in Lion. I may be wrong, though.
 
I did install Python 3.2.1 from python.org at the time I tested, but did not elect to update the shell profile... which to me suggests that there is indeed Python 3 support in Lion. I may be wrong, though.

Yes, you are wrong .
 
I don't know why you bring up Python 3. Lion does not include Python 3, and there are no Python-ObjC bindings for Python 3 that I am aware of from anywhere.

PyPI seems to list them for 3.1 and 3.2, although I haven't tested first hand (still on 2.x)
http://pypi.python.org/pypi/pyobjc-core/2.3

Long list of all python packages
http://pypi.python.org/pypi?:action=index
and then Cmd-F to find "pyobj" links to all the frameworks with bindings (nt that well organised AFAICT)

I tend to use MacPorts Python and these packages worked with that last time I used them (~6 months ago)

I found installing the PyPI versions with the default Python or python.org versions difficult to impossible.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.