I’ve been writing a lot of PyObjC code lately in TextMate. I found that there really wasn’t a good way to execute py2app based project in TextMate, which was considerably lengthing my hack/test/debug cycle. So I created a PyObjC bundle, and whipped up a little Build & Run PyObjC command which is activated by hitting Cmd+5 when you’re in a python scope.

This command depends on having an actual TextMate project to contain your code and the latest version of py2app (available via easy_install). The bundle will also find and parse any error messages that happen to fly out of your program, in order to link them back to your source code documents in TextMate. Feel free to email me (ibaird at this-blog’s-domain ) with any comments or queries regarding this bundle.

Update (4/25/07): I’ve updated the bundle in the link above to fix an issue I was having with the “app bundle finding” logic. This should fix any issues with the script.

Explore posts in the same categories: Cocoa, OS X, Python

2 Comments on “PyObjC TextMate Bundle”

  1. possen Says:

    Wow, cool! I was just thinking that PyObjC support was missing in TextMate. It would be really cool to do the name lookups like the Objective-C bundle does like when you hit NSAr[esc]

  2. joachimm Says:

    @possen
    create a new preference item in the bundle editor and add the following

    { completions = ( ‘NSArray’, ‘NSDictionary’, ‘NSMutableArray’, ‘NSMutableDictionary’, ‘NSMutableString’, ‘NSString’ ); }

    don’t forget to set the scope selector to source.python

Comment: