Re: [Zope-dev] Re: Event Timer Service for Zope 2.8
Dylan Jay [EMAIL PROTECTED] wrote: Tres Seaver wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris' ClockServer removes the need for such a thread, by hooking ZServer's mainloop to generate the faux request needed to kick off async processing. A crontab - like schedule can be driven equally well from ClockScheduler as from a separate thread. So what's wrong with including ClockServer in the core or making it easier to install? (ie not having to put packages in the python path which is hard with some hosting arrangements) And what's the argument against a core scheduler regardless of a clock? Isn't running background tasks a common need amoungst many very different tools and therefore a interstructure issue? Myself I'm for having ClockServer in the core, if Chris and others agree. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of RD +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Listing a groups users via Python and portal_groups
Im trying to implement a file system in the process i came accross Zope and ZODB however i cant figure out where to start since its important to study ZODB's architecture regards Hitesh Shetty On 7/22/05, J Cameron Cooper [EMAIL PROTECTED] wrote: Takahashi, Michael wrote: Thanks for the help, I actually figured it out. It turned out that portal.portal_groups.getGroupById(staff).getGroupUsers() was the solution. However, the getGroupUsers() function returns a list of users, but not as strings. So I had to convert the entire call with str() in order to run a comparison. So in the end this is how I achieved what I needed: portal.portal_membership.getAuthenticatedMember().getId() not in \ str(portal.portal_groups.getGroupById(staff).getGroupUsers()) The 'getGroupUsers' is not a good idea in a CMF environment. You should use the methods from the group tools. Like the ones I mentioned by name. One of them even does exactly what you want:: context.portal_groups.getGroupById('group1').getGroupMemberIds() --jcc -Original Message- From: J Cameron Cooper [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 12:36 PM To: Takahashi, Michael Cc: zope-dev@zope.org Subject: Re: [Zope-dev] Listing a groups users via Python and portal_groups Takahashi, Michael wrote: I'm trying to work on a function call using Python that will list the users of any specified group using the function portal_groups. I've been able to successfully do this the opposite way by getting the users groups via portal_membership: portal.portal_membership.getAuthenticatedMember().getGroups() Which will return all groups this user is associated with. So I've been testing using portal_groups with function calls similar to this: portal.portal_groups.getGroupById(staff).getUsers() Where staff is the name of the group. This almost does what I need, but not quite close enough because it lists all groups and all users. Any suggestions or help is greatly appreciated! It acquires 'getUsers' from somewhere, I guess. Group objects have 'getGroupMemberIds' and 'getGroupMembers' methods. You can see this in Products.GroupUserFolder.GroupDataTool.GroupData. the Products.GroupUserFolder.interfaces.portal_groupdata is a bit cleaner, but seems a little behind the times, as it's missing 'getGroupMemberIds'. Note that this isn't a good topic for zope-dev, but more for plone-users. --jcc ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Re: Event Timer Service for Zope 2.8
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dylan Jay wrote: Tres Seaver wrote: Chris' ClockServer removes the need for such a thread, by hooking ZServer's mainloop to generate the faux request needed to kick off async processing. A crontab - like schedule can be driven equally well from ClockScheduler as from a separate thread. So what's wrong with including ClockServer in the core or making it easier to install? (ie not having to put packages in the python path which is hard with some hosting arrangements) Hmm, I thought I was arguing *for* including ClockServer in the core; what I don't want is some of the alternatives which rely on running special threads. And what's the argument against a core scheduler regardless of a clock? Isn't running background tasks a common need amoungst many very different tools and therefore a interstructure issue? I could see including the Scheduler product as well, although there are some issues for long-running tasks which might not fit well (conflicts on the schedule itself are possible). Tres. - -- === Tres Seaver +1 202-558-7113 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC4Qr++gerLs4ltQ4RAg/BAKC9jzLSZ/CnMpDpKm7F+p2Wbm9CTACdEXgd c4gpIBSEXNa1gu3XDfF+JbQ= =DQrV -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Re: Listing a groups users via Python and portal_groups
Hitesh Shetty wrote: Im trying to implement a file system in the process i came accross Zope and ZODB however i cant figure out where to start since its important to study ZODB's architecture regards http://www.zope.org/Documentation/Articles Specifically http://www.zope.org/Documentation/Articles/ZODB1 http://www.zope.org/Documentation/Articles/ZODB2 Also http://www.zope.org/Wikis/ZODB/FrontPage http://www.zope.org/Members/adytumsolutions/HowToLoveZODB_PartI And, of course, http://www.zope.org/Documentation/Books/ZopeBook/ None of this was difficult to find. --jcc ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )