Re: [Zope-dev] PathIndex query options
- Original Message - From: "Jeffrey P Shell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, November 19, 2001 21:36 Subject: [Zope-dev] PathIndex query options > I've looked hard at the two pages returned for "PathIndex" on > Zope.org, and cannot make sense out of how to use 'level'. From > the example, which is full of paths like '/aa/bb/cc' and > '/cc/bb/cc' - all of the same size and using the same three > letters -, I cannot tell if I can do a path query to find objects > ONLY in a certain path, and not above or below it. > > I have a situation where I have a hierarchy of Task content > objects, and in one case I only want to display the immediate child > tasks at certain paths (basically to top-level tasks), using the > catalog query except for (hopefully) one changed parameter. > > http://www.zope.org/Members/michel/ZB/SearchingZCatalog.dtml > http://www.zope.org//Wikis/DevSite/Proposals/PathIndexDocumentation The level parameter specifies where the search starts. E.g. when you index an object with the URL http://www.zope.org//Wikis/DevSite/Proposals/PathIndexDocumentation then the PathIndex uses its physical path for indexing. In this example: '/Wikis/DevSite/Proposals/PathIndexDocumentation' Searching for "DevSite" and level=1 would give you this document as search result. The first element of the physical path has level 0, the second level 1 and so on. Hope this helps, Andreas ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] PathIndex query options
I've looked hard at the two pages returned for "PathIndex" on Zope.org, and cannot make sense out of how to use 'level'. From the example, which is full of paths like '/aa/bb/cc' and '/cc/bb/cc' - all of the same size and using the same three letters -, I cannot tell if I can do a path query to find objects ONLY in a certain path, and not above or below it. I have a situation where I have a hierarchy of Task content objects, and in one case I only want to display the immediate child tasks at certain paths (basically to top-level tasks), using the catalog query except for (hopefully) one changed parameter. http://www.zope.org/Members/michel/ZB/SearchingZCatalog.dtml http://www.zope.org//Wikis/DevSite/Proposals/PathIndexDocumentation Jeffrey P Shell, [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] uncaptured python exception error with asyncore
I got this in my STUPID_LOG_FILE as an error zope had right before it died however I am not sure how it can be fixed so that it doesn't happen again. What is strange is that zope did not truly die instead it lived on for a while and eventually killed all connection handling. I had to actually kill it manually to get it to stop and then restart it. Zope 2.3.3 Python 1.5.2 Redhat 7.1 At the same time it gave that error message the Z2.log recorded a few hundred grabs at the same two images on the server by one client. It appears zope did continue to work for a little while after that but from what I can tell of other users it performance degraded steadily until it just stopped handling requests. I would appreciate any suggestions you could make so that I can provide enough information to get this bug tracked down and killed. ERROR(200) ZServer uncaptured python exception, closing channel (socket.error:(104, 'Connection reset by peer') [/home/zope/Zope-2.3.3-src/ZServer/medusa/asynchat.py|initiate_send|211] [/home/zope/Zope-2.3.3-src/ZServer/medusa/http_server.py|send|399] [/home/zope/Zope-2.3.3-src/ZServer/medusa/asyncore.py|send|282]) Designing the webpages of tomorrow http://webme-eng.com Designing the MMORPGS of tomorrow http://worldforge.org ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Another Signal 11 Question
This problem still hasn't been resolved. I am using a source distribution of Zope. On our production machine, I only recompiled Python. Since the ZMI was reporting the new Python, I figured that was enough to fix the problem. I suppose I could alleviate one other possibility by recompiling Zope too. Alex Daniel Duclos wrote: >Em Quinta 15 Novembro 2001 13:34, Alex Kelly escreveu: > >>I too have been having a lot of restarts with error code 11. After >>reading some other comments relating to this, I recompiled Python 2.1.1 >>with the "--without-pymalloc" option. I have not yet seen any problems >>from doing this, but my questions are: Is this the preferred method to >>fix the Sig 11 restarts? Are there any other options? Are there any >>consequences to running zope without py_malloc? >> > > Hello Alex! > > Are you using source or binary Zope? Did you recompile Zope AND Python or >just Python?? How you resolved this? > > Thanx! > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] How to render DTML that is not stored in the ZODB?
Create a dtml-method programmatically and feed it your text with dtml vars embedded. Like so: def _dealWithDtml ( self, data ) : num_id = int(random.random() * 10) str_id = 'tmp' + str(num_id) self.manage_addProduct['OFSP'].manage_addDTMLMethod(id=str_id, title='') obj = self[str_id] obj.manage_edit(data, '') data = obj(self, self.REQUEST) self.manage_delObjects(str_id) return data robert - Original Message - From: "Dario Lopez-Kästen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 19, 2001 3:31 PM Subject: [Zope-dev] How to render DTML that is not stored in the ZODB? > Hello! > > I have a bunch of dtml in my Oracle DB, that I of course want to render. > > doing the does not work. > > I essence Zope does not render strings in variables to DTML. > > Any suggestions? (It has to be DTML) > > *MANY* Thanks In Advance. > > /dario > > - > Dario Lopez-Kästen Systems Developer Chalmers Univ. of Technology > [EMAIL PROTECTED] ICQ will yield no hitsIT Systems & Services > > > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) > ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] How to render DTML that is not stored in the ZODB?
> > My suggestion would be to create a very thin wrapper class in Python for > DTMLFile and use the advanced tab of the ZSQLMethod to make each row into a > DTMLMethodish type thing. > > See: > > http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.4.6.4.html Thanks, I'll look into that later on. For now, since I am under time-preassure, I opted for _.string.replace()... Thanks again, /dario ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] How to render DTML that is not stored in the ZODB?
On Monday 19 November 2001 09:31 am, Dario Lopez-Kästen allegedly wrote: > Hello! > > I have a bunch of dtml in my Oracle DB, that I of course want to render. > > doing the does not work. > > I essence Zope does not render strings in variables to DTML. > > Any suggestions? (It has to be DTML) > > *MANY* Thanks In Advance. > > /dario My suggestion would be to create a very thin wrapper class in Python for DTMLFile and use the advanced tab of the ZSQLMethod to make each row into a DTMLMethodish type thing. See: http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.4.6.4.html hth, /---\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association [EMAIL PROTECTED] \---/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] How to render DTML that is not stored in the ZODB?
Hello! I have a bunch of dtml in my Oracle DB, that I of course want to render. doing the does not work. I essence Zope does not render strings in variables to DTML. Any suggestions? (It has to be DTML) *MANY* Thanks In Advance. /dario - Dario Lopez-Kästen Systems Developer Chalmers Univ. of Technology [EMAIL PROTECTED] ICQ will yield no hitsIT Systems & Services ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Another Signal 11 Question
Em Quinta 15 Novembro 2001 13:34, Alex Kelly escreveu: > I too have been having a lot of restarts with error code 11. After > reading some other comments relating to this, I recompiled Python 2.1.1 > with the "--without-pymalloc" option. I have not yet seen any problems > from doing this, but my questions are: Is this the preferred method to > fix the Sig 11 restarts? Are there any other options? Are there any > consequences to running zope without py_malloc? Hello Alex! Are you using source or binary Zope? Did you recompile Zope AND Python or just Python?? How you resolved this? Thanx! -- daniel lobato duclos -- [EMAIL PROTECTED] -- http://www.hiperlogica.com.br - ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Idea: User Product Folder
This is more of an idea than a proposal at this point, so I thought I would post it here for discussion. There is a fishbowl project for creating an automated Product installation system. Something like Debian and FreeBSD have. Now, one of the issues that has been raised is whether you could make it so that Products could be installed TTW. As it stands right now, that is not possible since the Zope system user generally would not (and should not) have write access to the Products directory. It also seems there is some doubt as to the merit of TTW product installation. Well, speaking from a human interface perspective, I think a TTW interface for product management would be a good thing[tm] and could be a "bullet point" feature for zope. It would also be useful in making Zope slightly easier for hosting services to deal with. You wouldn't have deal with the shell and therefore it would be greatly more accessible. It would also make "trying out zope" easier and more fun for newbies and damn it, making Zope more fun is what I'm all about 8^) This morning I thought of one potential solution to this whole Product folder write access thing. There needs to be two types of product folders. The standard type, which would continue to work as we have come to know it and a "User Product" directory which would be writable from inside Zope. Now there would be at least two important restrictions on products in the "User Product" directory: 1. Installation of a User Product could not add or change files in the Zope core. 2. User Products can not "Monkey Patch" Zope. Restriction 1 is implicit and doesn't take any additional steps other than setting the Zope lib directory read-only from inside Zope. Restriction 2 is there to protect against trojan products that could easily expose restricted methods and attributes to the web or create deliberate security holes. Now obviously this doesn't prevent this from happening other ways, so this may not be sufficient. How to impose this restriction is not entirely clear to me, but it seems that there should be some way to do it in Python 2.2. Another possible but more severe restriction would be that "User Products" could not access certain attributes like "aq_base" or the like and would be subject to stringent security checking on attribute access. Whether that would be necessary I guess is one of the points of this discussion. Again, we may have to wait for Py 2.2 to make this happen. Now, once there is a "User Products" folder an infrastructure would need to be setup so that products could be downloaded in installed TTW. But that is another story... Whaddaya think? /---\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association [EMAIL PROTECTED] \---/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Hexadecimal-sequence of a jpeg-image from Python
Hello, I am trying to generate a RTF (Rich Text Format) file with images from Python 2.1. Firstly with MS-Word 97, I have saved a file with RTF format which contained a jpeg-image. I have edited this RTF file with a text editor, and I have seen as MS-Word converts the jpeg-image in a hexadecimal sequence. I would like to do the same process for converting a binary jpeg-image in a hexadecimal-sequence from Python. For it, I have maked the next process (using Python 2.1 and PIL library, in Windows): import Image im = Image.open("photo.jpg") file = open("filename.txt", "wb") file.write ( im.tostring ( "hex") ) file.close() With this process, I obtain a hexadecimal-sequence of the jpeg-image (in "filename.txt"). However, I am trying to work with this sequence but I can not do anything with it. I think this sequence is no valid, because I have replaced from a text editor the hexadecimal-sequence of MS-Word to the hexadecimal-sequence obtained by me, however when I open this file, MS-Word do not show the jpeg-image. Also, the hexadecimal-sequence generates by MS-Word is not equal to the hexadecimal-sequence generates by the previous process. Anybody could help me about this ? Thank you very much.