[Pythonmac-SIG] modifying setup.py: py2exe -> py2app
Bob Ippolito
bob at redivi.com
Wed Feb 2 14:43:30 CET 2005
On Feb 2, 2005, at 8:35, Charles Hartman wrote:
>
> On Feb 2, 2005, at 1:59 AM, Chris Jerdonek wrote:
>
>> Anyways, I double-clicked the hello icon. It appeared on the dock
>> and immediately collapsed without any output. Is this the desired
>> behavior?
>
> Something the program expects isn't available in your Mac's system.
> (There are two different "hello.py" examples. One of them imports an
> Image module. I suppose that *might* be it.) The app gets built all
> right, because the build process has told it OK, you'll find xyz when
> you actually run. Apps built for Tcl act this way when Tcl isn't
> installed on the system. No error message or anything -- except in
> Console, an app most Mac users are not used to consulting.
That's not true, py2app presents a GUI dialog for most errors. A
missing Python module is certainly one of those errors.
Neither of the examples named hello have a GUI dialog of their own, and
report information only to the console.
>> This created an executable icon in the Finder called "hello" in a
>> directory called "dist". Will this always be the stand-alone app?
>> (From the command line hello.app is a directory, which I don't
>> understand.)
>
> I think you're making the same assumption I did until recently: that
> an app and a folder are as essentially different as the Mac OS
> pretends they are. (In Unix, a directory [=folder] is just a special
> kind of file.) But if you Ctrl-click on any app, the contextual menu
> will include an item called Show Package Contents. That will show a
> folder window just like any other Finder folder window, except that
> its title is the name of the app. It has a folder in it called
> Contents, and that in turn has several files inside it including one
> called Info.plist (if you double-click this a special Mac editor comes
> up; welcome to the wonderful world of XML preference lists, but don't
> ask *me* for directions). The Contents folder also contains folders
> called MacOS and Resources. A lot of things you do with py2app have
> the effect of stuffing one thing or another (an icon file, a data
> file) into one of these. So an app turns out to be a whole village.
See the Property List Key Reference:
http://developer.apple.com/documentation/MacOSX/Conceptual/
BPRuntimeConfig/Concepts/PListKeys.html
-bob
More information about the Pythonmac-SIG
mailing list