[Zope3-Users] How i can get IRequest

2007-04-17 Thread Garanin Michael
Hello! How i can get IRequest in my event handler (i has only context)? Thanks! ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users

Re: [Zope3-Users] How i can get IRequest

2007-04-17 Thread FB
Hi, On Tue, Apr 17, 2007 at 08:55:02PM +0400, Garanin Michael wrote: Hello! How i can get IRequest in my event handler (i has only context)? from zope.security.management import getInteraction request = getInteraction().participations[0] Regards, Frank

[Zope3-Users] zope.intid and UUIDs

2007-04-17 Thread Derek Richardson
All, I've decided to go ahead and write an RFC 4122 UUID utility based on zope.intid (this is for a Plone SoC project, but this bit is pure Zope 3). I wrote most of it today and there is more code shared between the two than is different. The main differences are: * OOBTrees, instead of an

Re: [Zope3-Users] zope.intid and UUIDs

2007-04-17 Thread David Pratt
I like this idea of abstracting the code for ids myself. It will be interesting to hear what others have to say. Can you advise whether the UUID utility will be ZPL licensed since this is important if you are talking about something with generic functionality for z3. Many thanks. Regards,

[Zope3-Users] Re: zope.intid and UUIDs

2007-04-17 Thread Derek Richardson
I have no principled objection to a ZPL license. And I would like the code to make it into the core, if appropriate. So, the answer is, a ZPL license is likely. David Pratt wrote: I like this idea of abstracting the code for ids myself. It will be interesting to hear what others have to say.

Re: [Zope3-Users] Add unittest

2007-04-17 Thread Andrew Groom
Hi Florian, I've had some success with: import unittest class MyTestClass (unittest.TestCase): def test_something (self): ... def test_suite (): return unittest.TestLoader().loadTestsFromTestCase(MyTestClass) if __name__ == '__main__':