[Zope] Re: Getting a methods parent (in a product)
How can I get a Product instance's _actual_ parent when one of its methods is called? (In other ways: how can I find out, from an instance, where that instance is located without falling prey to acquisition in Zope 2?) from Acquisition import aq_inner, aq_parent parent = aq_parent(aq_inner(self)) This will return the true container the instance is set in, not just the acquisition parent. What's so bad about parent = self.aq_parent ? jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zoperun vs start and ssh
On 23 Jul 2005, at 18:46, virgil huston wrote: This may be a stupid question, but, after searching the archives to find out how to keep Zope running after starting and then disconnecting from a remote ssh session, nothing works. First, the Zope manual and all the archives messages talk about using ./start. That doesn't work for me unless I am just in the wrong directory. I am running ./zoperun from /bin. The start script was used in Zope versions up to 2.6.x, replaced by zopectl for safely starting and stopping Zope in the 2.7-series and up. Apart from that, packages that are put together by other people or by Linux distribution maintainers may have their own scripts. I have no idea what zoperun is, I'm assuming you mean runzope.py, which is part of 2.7.x and up? If not then this smells like some non- standard package, you should contact its maintainer. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Searching Content Objects in Zope 3
On 23 Jul 2005, at 19:01, Jim Vine wrote: As recommended on this list I opted for Zope 3 to build my app, and I'm finding it quite powerful. However, I've hit a bit of a brick wall around searching. In case you don't get help here, you should subscribe to the specific Zope 3 list and ask there: http://mail.zope.org/mailman/listinfo/zope3-users jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zoperun vs start and ssh
Oops, I meant to say runzope. I got Zope from the Zope web site, Zope-2.8.0-final. Virgil On 7/23/05, Jens Vagelpohl [EMAIL PROTECTED] wrote: On 23 Jul 2005, at 18:46, virgil huston wrote: This may be a stupid question, but, after searching the archives to find out how to keep Zope running after starting and then disconnecting from a remote ssh session, nothing works. First, the Zope manual and all the archives messages talk about using ./start. That doesn't work for me unless I am just in the wrong directory. I am running ./zoperun from /bin. The start script was used in Zope versions up to 2.6.x, replaced by zopectl for safely starting and stopping Zope in the 2.7-series and up. Apart from that, packages that are put together by other people or by Linux distribution maintainers may have their own scripts. I have no idea what zoperun is, I'm assuming you mean runzope.py, which is part of 2.7.x and up? If not then this smells like some non- standard package, you should contact its maintainer. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zoperun vs start and ssh
This is a system administration problem, not a zope problem. :D If you want to start zopectl ever you need to configure it on /etc/init.d/ with rc-update.d on debian or chkconfig on fedora. Yo use a ssh session and start your service and if you close ssh connection you close the application too. See on you distro for config process to start on your /etc/init.d/ Bye. virgil huston escribió: Thanks for pointing me to zopectl. I had to ./zopectl, then type start from the zopectl prompt. Virgil On 7/23/05, virgil huston [EMAIL PROTECTED] wrote: Oops, I meant to say runzope. I got Zope from the Zope web site, Zope-2.8.0-final. Virgil On 7/23/05, Jens Vagelpohl [EMAIL PROTECTED] wrote: On 23 Jul 2005, at 18:46, virgil huston wrote: This may be a stupid question, but, after searching the archives to find out how to keep Zope running after starting and then disconnecting from a remote ssh session, nothing works. First, the Zope manual and all the archives messages talk about using ./start. That doesn't work for me unless I am just in the wrong directory. I am running ./zoperun from /bin. The start script was used in Zope versions up to 2.6.x, replaced by zopectl for safely starting and stopping Zope in the 2.7-series and up. Apart from that, packages that are put together by other people or by Linux distribution maintainers may have their own scripts. I have no idea what zoperun is, I'm assuming you mean runzope.py, which is part of 2.7.x and up? If not then this smells like some non- standard package, you should contact its maintainer. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Token 'ATOM' required, 'and' found
I'm using zope 2.7.5 and when doing a catalog search in a ZCTextIndex containing the starting with the word and it barfs with this errror: E.g. http://www.peterbe.com/search?q=and+i+cant+stop+thinking+about+you Error Type: ParseError Error Value: Token 'ATOM' required, 'and' found (traceback below) It works perfectly fine with http://www.peterbe.com/search?q=i+and+cant+stop+thinking+about+you because then it doesn't start with and. The easy fix is so do something like this: if q.lower().startswith('and'): q= q[3:] results = self.Catalog.searchResults(title=q) But, is there a more robust solution to this? One that doesn't require hardcoded English words in the code. Is there a way to escape and and or to treat them as actual words? Traceback (innermost last): Module ZPublisher.Publish, line 101, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 39, in call_object Module Products.Peterbecom.Homepage, line 967, in SearchCatalog Module Products.Peterbecom.Homepage, line 985, in getSearchResults Module Products.ZCatalog.ZCatalog, line 649, in searchResults Module Products.ZCatalog.Catalog, line 753, in searchResults Module Products.ZCatalog.Catalog, line 496, in search Module Products.ZCTextIndex.ZCTextIndex, line 198, in _apply_index Module Products.ZCTextIndex.QueryParser, line 123, in parseQuery Module Products.ZCTextIndex.QueryParser, line 163, in _parseOrExpr Module Products.ZCTextIndex.QueryParser, line 176, in _parseAndExpr Module Products.ZCTextIndex.QueryParser, line 211, in _parseTerm Module Products.ZCTextIndex.QueryParser, line 230, in _parseAtom Module Products.ZCTextIndex.QueryParser, line 158, in _get Module Products.ZCTextIndex.QueryParser, line 144, in _require ParseError: Token 'ATOM' required, 'and' found -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zoperun vs start and ssh
you can also run start as a param... ./zopectl start hth bobb - Original Message - From: virgil huston [EMAIL PROTECTED] To: zope list user zope@zope.org Sent: Saturday, July 23, 2005 3:29 PM Subject: Re: [Zope] zoperun vs start and ssh Thanks for pointing me to zopectl. I had to ./zopectl, then type start from the zopectl prompt. Virgil On 7/23/05, virgil huston [EMAIL PROTECTED] wrote: Oops, I meant to say runzope. I got Zope from the Zope web site, Zope-2.8.0-final. Virgil On 7/23/05, Jens Vagelpohl [EMAIL PROTECTED] wrote: On 23 Jul 2005, at 18:46, virgil huston wrote: This may be a stupid question, but, after searching the archives to find out how to keep Zope running after starting and then disconnecting from a remote ssh session, nothing works. First, the Zope manual and all the archives messages talk about using ./start. That doesn't work for me unless I am just in the wrong directory. I am running ./zoperun from /bin. The start script was used in Zope versions up to 2.6.x, replaced by zopectl for safely starting and stopping Zope in the 2.7-series and up. Apart from that, packages that are put together by other people or by Linux distribution maintainers may have their own scripts. I have no idea what zoperun is, I'm assuming you mean runzope.py, which is part of 2.7.x and up? If not then this smells like some non- standard package, you should contact its maintainer. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Puzzling Import/Export problem
A friend in Russia is still using my old ZClasses QSurvey product. He is attempting to copy an installation from one machine to another, and upgrade Zope to 2.6.4. Exporting the product and instances works fine, but some object instances will not import correctly. A product instance is a folderish object that contains other objects. One particular folderish subobject will not import correctly; all the others import fine. The .zexp of the entire product instance, with subitems, etc., imports OK, but the one folderish object shows up as broken in the ZMI. Exporting that object as XML and reimporting after correcting the appropriate class ID string results in a BadPickleGet error 7. Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module OFS.ObjectManager, line 561, in manage_importObject Module OFS.ObjectManager, line 578, in _importObjectFromFile Module ZODB.ExportImport, line 65, in importFile Module OFS.XMLExportImport, line 119, in importXML Module ZODB.ExportImport, line 75, in importFile Module transaction._transaction, line 368, in commit Module transaction._transaction, line 297, in savepoint Module transaction._transaction, line 294, in savepoint Module transaction._transaction, line 656, in __init__ Module ZODB.Connection, line 1034, in savepoint Module ZODB.Connection, line 470, in _commit Module ZODB.ExportImport, line 140, in _importDuringCommit BadPickleGet: 7 I have examined the xml export, and the only thing I can think of that might be a problem is that some of the object IDs for some contained items are base64-encoded and may contain Russian characters. But that does not seem to be the problem, since a similar, smaller import with only ascii characters fails with the same traceback and BadPickleGet:10. I realize that this might be an uninteresting edge-case. My backup plan is to write a script to pull the data out of the XML export and recreate the objects. Does anyone have any pointers on that? I am having trouble figuring out how that file is organized. For completeness, I am using zope-2.8.0, but this happens on 2.7.6 as well. -Jim Washington ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zoperun vs start and ssh
On 23 Jul 2005, at 20:48, bobb wrote: you can also run start as a param... ./zopectl start With zopectl the is unnecessary. It does all the right things to go into the background and detach from the terminal by itself without the ampersand. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] zoperun vs start and ssh
- Original Message - From: Jens Vagelpohl [EMAIL PROTECTED] To: zope list user zope@zope.org Sent: Saturday, July 23, 2005 4:26 PM Subject: Re: [Zope] zoperun vs start and ssh On 23 Jul 2005, at 20:48, bobb wrote: you can also run start as a param... ./zopectl start With zopectl the is unnecessary. It does all the right things to go into the background and detach from the terminal by itself without the ampersand. Absolutely, I probably should have mentioned that. jens ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Plone: storage, catologing and versioning
Rogério Atem de Carvalho wrote: Hi, I have a few questions about Plone (in some extent CMF/Zope): 1)How to manipulate versioning in Plone? (like CPS does) I know there is PLIP8, but it is still a proposal, isn't it? have a look at CMFEditions on svn.plone.org/collective . it is also published on plone.org site we have publieshed an alpha release, and hope to fix the remaining bug over the summer, please feel free to contribute. On sourceforge.net/projects/collective you can find the collective-versioning which we use to discuss on subject and coordinate the effort. 2)How to store and catalog huge document collections? -LocalFS + ZCatalog? what do you mean with huge? -Implement mapping and indexing in a relational DB? google for shane's apelib or look int svn.plone.org/archetypes (I have also de ERP5's ZSQLCatalog option...) 3)Is there any product or Plone plug-in that allows enhanced searches through thesaurus or ontologies, or something like this? I know there are Ontobroker and Gnowsys, but I would like to have something simpler to work on top of Plone. nothing ready i think, but for a generic library that enables you to perform complex queries over a catalog google fro Dieter's AdvancedQuery product. Also, it is possible to implement ontologies in plone using Archetypes references and maybe using the Relations product (always from Archetypes svn o) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] how do I check if an object have being recently updated??
I want to post a update date that will change when any ofthe objects in a folder has been updated. So far, I only know the command bobobase_modification_time, but it only works again the object I I enter the command with.. Can anyone show me how this is done?? Start your day with Yahoo! - make it your home page ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope-dev] Re: Event Timer Service for Zope 2.8
On Fri, 2005-07-22 at 13:11 +0200, Florent Guillaume wrote: 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. It's fine with me. We maybe just need to remove the C extension in it... someone (you?) provided a pure python implementation of what it does that probably runs just as fast. I wouldn't be apt include the Scheduler product in the core. I think it may be a tad too complicated. The Event product is likely superseded by the Zope 3 event system included in Five. - C ___ 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
Chris McDonough wrote: On Fri, 2005-07-22 at 13:11 +0200, Florent Guillaume wrote: Dylan Jay [EMAIL PROTECTED] wrote: Tres Seaver wrote: Myself I'm for having ClockServer in the core, if Chris and others agree. It's fine with me. We maybe just need to remove the C extension in it... someone (you?) provided a pure python implementation of what it does that probably runs just as fast. There is also TimerService by Nikolay Kim. Does that work in the same way? One nice feature of this is that products such as a scheduler subscribe to its tick so that many products can benifit from the clock. This seems more flexible to me, rather than putting the path to be called in the zope.conf. Another nice feature is a plugin archetecture shown by http://www.last-bastion.net/portal_zpydoc/Products.ZScheduler.html Here one kind of clock can be replaced by another so for instance a cron job could be used instead of the clockservice. That product also had a singlethreaded clock that ensured the next tick didn't occur until the last finished. Personally I think that is the schedulers job rather than the clocks but I do think allowing an cron override is a good idea. So perhaps the archetecture could look something like ClockService (outside zope) v Clock ControlPanel (inside zope... could also be called via cron wget) v v Scheduler A Product X In other words products subscribe to the clock control panel in order to get a regular call back and the clock control panel is driver from clockserver or some other outside source. Or alternatively you could just make the clock control panel a scheduler and say that anyone wanting a clock tick has to register a recurring task. I wouldn't be apt include the Scheduler product in the core. I think it may be a tad too complicated. Do you mean the zope cvs scheduler? I think this is the simplest implementation I've seen. It is API friendly in that it allows for code to add events reasonably easily. Its UI could be improved somewhat. The Zscheduler above as a nicer UI that could be borrowed. I think the cvs scheduler needs to at least have an option of not allowing more than one task at a time to run. This could be implemented in the callers code but it is a nice service. At the very least the current code needs to be fixed as it causes conflicts if its notify is called before the last one has finished. The Event product is likely superseded by the Zope 3 event system included in Five. Is there really a need for an event system? I can't see where the actual event system is even used in the cvs scheduler. Surely a listener/talker pattern is easy enough to implement? ___ 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 )