Re: [Zope-dev] How to trigger Zope externally (mail)
On Wed, Feb 26, 2003 at 05:37:17PM -0800, Andy McKay wrote: > Or just write a simple HTTP post using Python. Have a look around for > the MailIn Product, or CMFMailIn which does this very simply and works > fine for low volume traffic (eg: fine listening to [EMAIL PROTECTED]). Thanks. I borrowed from CMFMailIn; I couldn't find the MailIn product. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] implementing structured text alternative w/in Zope
I'm a programmer but new to Zope. I'm developing a text markup language like Structured Text that better suits my needs outside the Zope/Python world. Would I be able to incorporate it within Zope, i.e., so I could edit the new format in the edit window and have it displayed as HTML by the server, handled as a Zope object, etc.? I'd like to do it as transparently as (on the lowest level) possible, but if it turns out I have to do it as a feature of a product, that will be OK. Any tips for either scenario much appreciated. Remember that in the grand scheme of things, most everything in Zope is a Product. And practically everything can be manipulated by a product. Especially with what you intend to do: not too long ago was ZPT an add-on product, as well as STX. DTML and ZSQLMethods are implemented as products. So you're not really losing anything by doing it that way. If what you're doing is really useful and general, perhaps it will be added to the Zope distribution sometime in the future, but you needn't count on that.' --jcc ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] umount/remount
Florent Guillaume wrote: Is there any way to "unmount" then "remount" a mounted storage from a running Zope? Use case: mounting it read-only most of the time, and switching to read-write at selected points when updates are allowed. It would be fairly easy (no "unmount" necessary--just toggle the readonly flag on a running database), but the bigger question is how users will toggle the flag. Through the control panel? Shane ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] implementing structured text alternative w/in Zope
--On Freitag, 7. März 2003 19:20 +0100 Joachim Werner <[EMAIL PROTECTED]> wrote: Toby Bologna schrieb: Hi, I'm a programmer but new to Zope. I'm developing a text markup language like Structured Text that better suits my needs outside the Zope/Python world. Would I be able to incorporate it within Zope, i.e., so I could edit the new format in the edit window and have it displayed as HTML by the server, handled as a Zope object, etc.? Check out the integration of reStructuredText in Zope 2.7. -aj ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] implementing structured text alternative w/in Zope
Toby Bologna schrieb: Hi, I'm a programmer but new to Zope. I'm developing a text markup language like Structured Text that better suits my needs outside the Zope/Python world. Would I be able to incorporate it within Zope, i.e., so I could edit the new format in the edit window and have it displayed as HTML by the server, handled as a Zope object, etc.? I'd like to do it as transparently as (on the lowest level) possible, but if it turns out I have to do it as a feature of a product, that will be OK. Any tips for either scenario much appreciated. Of course you can do that with Zope. You'll find quite a few examples of new markup languages for Zope if you browse the Products list on zope.org. You definitely will have to write a product for this. You need a basic method or document object (like DTMLMethod). Writing or adapting the over-the-web edit screens is simple. The harder part will be the parser that generates the HTML for you. But I guess you know how to do this. There is one thing that might be trickier than you'd expect: If you want to have the same security features as in DTML or ZPT (i.e. checking for every method call and attribute if the viewer has the permissions to execute/view them) you will have to implement much of that on your own in the language parser. Note that if you keep it as simple as structured text you won't need to care about the security issue. In structured text you don't call other code or attributes ... The document object will have to implement a __call__() (or index_html()) method for it. This method has to take the code (that is stored in a property of the object) and render it. Then you just "return" the result at the end. It's really not that difficult, and if you take a similar product and look at the code it is relatively easy to understand. Be sure that you read the Zope Developers Guide on zope.org first! Joachim ___ Zope-Dev maillist - [EMAIL PROTECTED] 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: [Vote] PEP308 voting began
Steve Alexander wrote: > This is possible. But, the problem remains that both a and b (in your > example above) are evaluated. I don't see the problem with that, unless a or b actually do stuff, and modify stuff, and if it does, in ZPT it should then be put into a script, since the template itself shouldn't contain any business logic. I can see the use of a one-line if-else syntax in ZPT as a way to set an attribute without making a specific pythons script just for such a small piece of code, and this will do it. If you want to *DO* different stuff depending on a condition, that shouldn't be in the template. Also, Evan tells me that this already exists in python: expressions, and is called test(). So, problem solved, no additional uglyfication of Python is needed. :) ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] umount/remount
Is there any way to "unmount" then "remount" a mounted storage from a running Zope? Use case: mounting it read-only most of the time, and switching to read-write at selected points when updates are allowed. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:[EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] 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: [Vote] PEP308 voting began
On Fri, Mar 07, 2003 at 07:33:44AM +0100, Joachim Werner wrote: > If I understood the intentions of ZPT right one of the ideas was to get > rid of too much application logic in the template. But currently ZPT > seems to be extended to become very similiar in functionality to DTML. > I'd prefer to see an approach where Python is used wherever it makes > sense and ZPT is kept as simple and stupid as possible. +sys.maxint "ugly" python expressions in ZPT is to me a clear signal that you need to refactor and that's a GOOD THING. And refactoring is easy when you can just start by copy / pasting the python expressions into a Script. If they were some new-fangled "if: then: else:" syntax in TAL, you'd have to rewrite from scratch... and we're right back in the mess we got into with DTML: the poor developer is forced to learn many ways of doing the same thing. -- Paul Winkler http://www.slinkp.com look! up in the sky! it's secretary The Archer of Doom (randomhero courtesy isometric.spaceninja.com) ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] implementing structured text alternative w/in Zope
Hi, I'm a programmer but new to Zope. I'm developing a text markup language like Structured Text that better suits my needs outside the Zope/Python world. Would I be able to incorporate it within Zope, i.e., so I could edit the new format in the edit window and have it displayed as HTML by the server, handled as a Zope object, etc.? I'd like to do it as transparently as (on the lowest level) possible, but if it turns out I have to do it as a feature of a product, that will be OK. Any tips for either scenario much appreciated. Thanks in advance, --tb __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ ___ Zope-Dev maillist - [EMAIL PROTECTED] 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: [Vote] PEP308 voting began
The method if_else would look like: def if_else(c, a, b): if c: return a else: return b I'm not expert in how python expression work, and hence don't know how to make python expressions aware about this method, but I'm sure it's possible, right? This is possible. But, the problem remains that both a and b (in your example above) are evaluated. The python syntax change, and the TALES syntax change, would mean that only one of a and b are evaluated. -- Steve Alexander ___ Zope-Dev maillist - [EMAIL PROTECTED] 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: [Vote] PEP308 voting began
OK, how about this: 1. Python is kept as is. 2. To support one-line if-else in attributes in ZPT, the python expressions used in ZPT imports an extra method. This method can be called whetever people want it toi be called, but for claritys sake lets call it 'if_else' if_else(expression, true_result, false_result) thusly: Ok, then we can do if-then-else in one line for attributes of ZPT, without having to define a pythonscript that does it. The method if_else would look like: def if_else(c, a, b): if c: return a else: return b I'm not expert in how python expression work, and hence don't know how to make python expressions aware about this method, but I'm sure it's possible, right? ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] ZODB: Are all handles closed?
Ulla Theiss wrote: Hello list, in our product (and additionally in an other process) we use separate ZODB-Storages. Opening and closing the ZODB several times the number of file-handles increases. You might want to post this to [EMAIL PROTECTED] instead of [EMAIL PROTECTED] Also, be sure to say what version of python and zodb you are using. -- Steve Alexander ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] ZODB: Are all handles closed?
Hello list, in our product (and additionally in an other process) we use separate ZODB-Storages. Opening and closing the ZODB several times the number of file-handles increases. We have separated the multiple openings and closings to the following code. It shows the increasing of the handles clearly. Have we forgotten to clear anything or made anything wrong? If not, has anybody an idea, how to fix or work around the problem. --snip--snap- from ZODB import FileStorage, DB for i in range (1,100): storage=FileStorage.FileStorage("TestZODB.fs") db = DB(storage) db.open() print "Open" db.close() print "Close" storage.close() --snip--snap- Enother nice behaviour we can achieve with the following code: --snip--snap- from ZODB import FileStorage, DB storage=FileStorage.FileStorage("TestZODB.fs") db = DB(storage) for i in range (1,100): db.open() print "Open" db.close() print "Close" storage.close() --snip--snap- It works about seven times. Then the programm hangs completely. Much thanks in advance, Ulla. ___ Zope-Dev maillist - [EMAIL PROTECTED] 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: Security internals, was Re: [Zope-dev] LOTS of roles?
hm... i could have told you that the LDAPUser class in the LDAPUserFolder product can do that but i had the whole thread mostly tuned out. initially it did not look like anything i could help with and the first posting was very long if i remember correctly. jens On Thursday, Mar 6, 2003, at 17:13 US/Eastern, Paul Winkler wrote: On Fri, Mar 07, 2003 at 08:56:59AM +1100, Adrian van den Dries wrote: (/me revisits LDAPUserFolder) Looks like the work is already done for you anyway: allowed() and friends check if the context has an attribute acl_satellite, and queries it for any additional roles, and it even keeps a cache. !! OMG !!! thank you - for some obscure reason it never would have occurred to me in a million years that LDAPUserFolder already does this. Well, duh. Huzzah open-source software! Amen! -- Paul Winkler ___ Zope-Dev maillist - [EMAIL PROTECTED] 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] [Vote] PEP308 voting began
In article <[EMAIL PROTECTED]> you write: > Guido van Rossum wrote: > > > > IMO TALES should solve this for itself by introducing an if/then/else > > expression form rather than depending on Python. If you can have a > > "not:.." expression, surely you can have an "if:..:then:..:else:.." > > expression. > > I think not: is dubious and I'd find if-then-else way over the lines... What?!! not: is very useful. How do you write alternatives without it? Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:[EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 )