[Pythonmac-SIG] Trying to make an app
Bob Ippolito
bob at redivi.com
Wed Oct 6 22:22:08 CEST 2004
On Oct 6, 2004, at 3:45 PM, Bob Ippolito wrote:
> On Oct 6, 2004, at 3:04 PM, Steven Palm wrote:
>
>> On Oct 6, 2004, at 12:04 PM, Bob Ippolito wrote:
>>>> So the difference in invocation between the bundlebuuilder-built
>>>> application bundle and the py2app-built application bundle is
>>>> causing a problem with finding the path where we are being run
>>>> from, at least in the way that BitPim is trying to find it in the
>>>> above code. Anyway, that's something for me to worry about. ;^)
>>>
>>> Ok so don't do that! Your application is trying to be too tricky.
>>> sys.path[0] is going to point to the os.path.dirname(sys.argv[0]),
>>> which is the bootstrap executable. sys.path[1] is Resources,
>>> though.
>>
>> Well, this isn't *my* app, it's Roger Binns who is the main
>> developer, I just pitch in to build Macintosh versions. He really on
>> the whole abhors platform unique and is doing that too (I assume)
>> deal with Windows and Linux in a consistent fashion. If it proves
>> that py2app is the best Mac packaging solution, then it may also be
>> required to change that initialization code to fit it.
>
> I'll see if I can change sys.path[0] without breaking anything useful.
It's changed in svn trunk. sys.path[0] should point to
Contents/Resources now.
-bob
More information about the Pythonmac-SIG
mailing list