[Pythonmac-SIG] Application without py2app?
Thorsten Kohnhorst
monsterkodi at gmx.net
Mon May 15 19:54:12 CEST 2006
Hello Ronald,
thanks for the fast reply.
>> I would like to know if it is possible to create an Cocoa application
>> without using py2app.
>
> Sure, you can build the .app bundle by hand. Apple's website documents
> the structure of bundles.
Well, I am happy with the bundle that was generated by py2app.
I just want to start the application from the python script and not
from the generated executable (see below).
>> So far I managed to load the nib from a path by calling
>>
>> NibClassBuilder._nibInfo._extractClassesFromNibFromPath(nibFilePath)
>>
>> instead of
>>
>> NibClassBuilder.extractClasses(nibFile)
>
> That's wrong, methods starting with underscores should be
> considered private. Furthermore this has nothing to do with py2app.
Yes, I know.
I already found out that I can accomplish the same by specifying the
bundle explicitly:
bundle = NSBundle.bundleWithPath_("./build/Development/krix.app")
info = bundle.infoDictionary()[u'PyObjCXcode']
for nibFile in info[u'NIBFiles']:
NibClassBuilder.extractClasses(nibFile, bundle)
But the app still exits with this message:
>> Python[310] No Info.plist file in application bundle or no
>> NSPrincipalClass in the Info.plist file, exiting
>>
>> This is probably because the Pythons bundle is used.
>> Does anybody know how to tell the application to use another bundle?
>
> Which brings us to the main point: I have no idea what you are
> trying to accomplish.
>
> If I had to guess I'd guess that you want to create a python GUI
> without using an .app bundle. That is possible, but not recommended
> (hence the lack of details about how to do this ;-))
No, I am fine using an application bundle.
It's just that the IDE I am trying to use (SPE) seems to know nothing
about executables.
And I guess that the included debugger might only work if the
application is started from a python script.
If there was another way to use a python IDE with a debugger I won't
care about how exactly the app is started.
I hope I made myself clearer now.
Thanks again for your fast reply.
Yours kodi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20060515/c2484fc6/attachment.htm
More information about the Pythonmac-SIG
mailing list