On 23 Mar, 2008, at 21:01, Daniel Andersson wrote:
>>> Have built a small interface and saved it as a .nib-file. Now when I
>>> try to run my main.py, I get:
>>> $ python main.py
>>> 2008-03-22 21:38:35.423 Python[460:613] No Info.plist file in
>>> application bundle or no NSPrincipalClass in the Info.plist file,
>>> The examples found on the PyObjC website didn't work this way
>>> My main.py DOES work when I run it through Xcode. Since I can't say
>>> I'm a fan of Xcode, I'd like to be able to run it in iTerm (or
>>> TextMate). Is this possible?
>> If you use NIB's you must run your application as an .app bundle.
>> There are two ways
>> to build such a bundle: (1) use an Xcode project to build the
>> project and
>> (2) use py2app. The latter is used by all PyObjC examples, you can
>> "python setup.py py2app" to build the .app bundle.
> Ah, I can create a bundle and edit the code inside the bundle/app,
> nice. Thank you :)
> The thing I wanted to get around was recompiling/recreating the app
> each time I wanted to try out the program.
If you use py2app you can use "python setup.py py2app -A" to create an
alias bundle. This behaves just like a normal bundle, but references
the source code outside of the bundle. That way you can use all the
niceties of py2app, without having to rebuild the .app every time. You
will have to build a regular .app to distribute to others though, the
alias bundle is not self-contained.