[Pyobjc-dev] Newer NibLoader.py
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2002-11-16 23:27:23
|
bb...@ma... wrote: > Assuming the changes are going to be relatively small from here out, > I'm going to change the Cocoa-Python project accordingly. I've submitted an sf support request regarding my cvs problems. In the meantime, here is my working version, still named NibLoader.py. The command line program prints a complete Python template, using AutoBaseClass. (I'll think a bit more about your naming suggestions.) Currently the __metaclass__ = NibClassLoader idiom still works, but I'm tempted to rip it out... I'd be interested in comments from Ronald and Jack, though. > I may also look into using a pure python main, as well. That one I recently posted ;-): #!/usr/bin/env python import os from sys import argv, executable realmain = os.path.join(os.path.dirname(os.path.dirname(argv[0])), "Resources", "realmain.py") argv.insert(1, realmain) os.execve(executable, argv, os.environ) This could be a template, where "realmain.py" is replaced with the appropriate filename. (Jack has checked in a modified version into the Python CVS tree that fits his needs better. Since it's such a trivial program, I don't think it's bad to add our own template.) Just |