[Pyobjc-dev] Python rather than ObjC for main?
Brought to you by:
ronaldoussoren
|
From: Peter M. <zig...@po...> - 2002-11-06 14:23:46
|
Is there any reason why the executable pointed to by CFBundleExecutable has to be a Mach-O file? As a quick test I threw the HelloWorld.py example into a .app Bundle, copied and edited a reasonable Info.plist and I now have a double clickable version of hello world that still doesn't use any C code. I just added #!/usr/bin/env python to the top of HelloWorld.py and ran chmod +x on it. Now, I've been experimenting with making a modified Main.py the CFBundleExecutable, hoping to avoid the execve(). I can't seem to get it working though. NSApplicationMain() dies complaining about not finding the Info.plist file. I'm not sure I understand what's happening. The launch arguments seem to carry across OK. Am I reinventing the broken wheel here? Do we have the execve() procedure because the simpler approach fails? Obviously this approach would be inferior to having an embeddable version of python in an ObjC wrapper but could this approach be used to remove the execve()? Just a thought, Peter |