is PyObjC still in use?

Discussion in 'Mac Programming' started by Chirone, Aug 9, 2011.

  1. Chirone macrumors 6502

    Mar 2, 2009
    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 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?
  2. MorphingDragon macrumors 603


    Mar 27, 2009
    The World Inbetween
    Not if you want to use Python 3.

    Yes, on Apple systems there is something called Objective-C++.
  3. larkost macrumors 6502a

    Oct 13, 2007
    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.

    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.

    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.
  4. balamw Moderator


    Staff Member

    Aug 16, 2005
    New England
  5. Chirone thread starter macrumors 6502

    Mar 2, 2009
    MorphingDragon: noted, thanks

    larkost: thanks, that's good to know.

    I shall explore python-objc now
  6. wrldwzrd89 macrumors G5


    Jun 6, 2003
    Solon, OH
    Actually... I think you'll be pleasantly surprised regarding Lion and Python 3. Typing:
    ... 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 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.
  7. Mac Player macrumors regular

    Jan 19, 2006
    Yes, you are wrong .
  8. AlmostThere macrumors 6502a

    PyPI seems to list them for 3.1 and 3.2, although I haven't tested first hand (still on 2.x)

    Long list of all python packages
    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 versions difficult to impossible.

Share This Page