Somebody else had a Cheetah and template issue with py2app. The custom import hook is not recognized by py2app and I have no interest in writing that kind of Cheetah-specific stuff at this time (I don't use it, and I actually really don't like anything about it). The person who had that problem managed to precompile the tempates into .pyc or something with some facility that comes with Cheetah or WebWare, which py2app could handle just fine. I have no idea if this discussion was had on pythonmac-sig, pyobjc-dev, or #macpython, but that's what I remember of it.

-bob

On Jan 14, 2005, at 21:28, Kevin Dangoor wrote:

That's good to hear. The more I thought about it, the more it seems like there are other cases where "non-standard" imports are more than a little useful. I'm actually running into another Cheetah-related problem when I use py2app (though this one is very clearly in Cheetah land), and it's also import related. If I spot anything wacky as I look at that problem, I'll let you know.

Kevin

Bob Ippolito wrote:

I don't think there is typically a gotcha with imports, I've certainly never seen this happen before, and I have done imports from applicationDidFinishLaunching: (pygame, in particular) before. I have no idea if I should be blaming Cheetah, PyObjC or Python 2.3.0 (haven't tested with 2.4 or CVS), but I will try and remember to dig in later.

-bob

On Jan 14, 2005, at 16:56, Kevin Dangoor wrote:

Wow. That was quick!

I didn't realize that there was a gotcha with the imports. That was just a premature optimization, so I can easily avoid that :)

Thanks for your help... that's certainly not the kind of thing I would have just guessed...

Kevin

Bob Ippolito wrote:

(Kevin sent me the test off-list, and I took a look at it).

I'm not sure exactly why your example crashes (somehow a retain message gets sent to a dead or non-object), however, the problem is that you are using an import statement from inside the implementation of the action. Don't do that. Do your imports in module level code.

-bob



_______________________________________________ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/pythonmac-sig







_______________________________________________ Pythonmac-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to