Re: [Zope-dev] Please Help!!! - HelpSys
Lena wrote: I actually need to create a simple web-editor, something very similar to HelpSys, but I need to link tree items to the folders I create dynamically in Zope. I'd suggest looking at the ZWiki Product, it may be exactly what you want: http://www.zope.org/Members/simon/ZWiki cheers, Chris ___ 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] Session Objects?
On Tue, 23 May 2000, Adam Pawliuk wrote: Although there is several user characteristics that we would like to store in a session object cached in server RAM, such as the user's unique system ID, greeting name, etc; rather than having to hit the DB for this information on each request. Basically we would like to use something similar to the session objects in ASP (yuck), or Java JSP/servlet model. I've seen several Zope session products although they all seem to hook directly to a DB and don't seem to provide memory persistence which is what we would like to use. Is there any existing products which do this? Boring old ZSQL Methods actually do exactly what you want - check out the caching options under the advanced tab (or the ZSQL docs on zope.org). The database will only be hit the first time you call the method with a given set of parameters, or when maximum time to cache expires. If your GUF hooks make use of ZSQL methods, you should have a look at tuning these too as it can be a big performance improvement. Actually - I tell a slight lie. The DB might be hit once for each thread, as the ZSQL cache is not shared between Zope threads. You need to be aware of this as a cached result may be refreshed in one thread but not yet expired in another and can give ambiguous results and unreproducable bugs if you are not aware of it when you are developing. -- ___ // Zen (alias Stuart Bishop) Work: [EMAIL PROTECTED] // E N Senior Systems Alchemist Play: [EMAIL PROTECTED] //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen ___ 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] zpatterns: rackmountables must be of-wrapped
Hello, I believe items got from a rack have to be wrapped in context of the rack. I've been bitten by this (and it hurts!). When I try to use items from DTML, only the superuser can use it, even managers can't access the objects. When I wrap the items in the context of the rack, everything is fine. So: retrieveItem, createItem use vanilla objects getItem, newItem wrap objects before returning them regards, jephte clain [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] ZCatalog and Unique IDs
Hi, I hope this is a stupid question but why does ZCatalog use the URL of an object to uniquely identify it? Why not just use a reference to the object? Persistent object identifiers must exist for the ZODB so why not use them instead? cheers, Chris PS: This would solve all the problems with ZCatalogs and virtually hosted sites... I think the traversal interface is needed for other reasons but it should remove ZCatalog from the list of things that need it... not that I've just been bitten by this or anything ;-) ___ 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] ZCVS Mixin class... feedback sought.
Hi Chris, The basic idea is that you can export individual zope objects in a container to the filesystem, not to the 'var' directory, but to a directory under CVS control. Then you can commit, update, add, remove etc files (each of which is the xml representation of a zope object) and keep track of what's what. The only commands available zope right now are 'add' 'commit' and 'update'. You can of course use CVS in the normal way. -steve "Chris" == Chris Withers [EMAIL PROTECTED] writes: Chris Steve Spicklemire wrote: http://www.zope.org/Members/sspickle/ZCVSMixin Chris Sounds like a cool idea, but I don't really understand what Chris it does and how you use it. Chris Could you give use some enlightenment? Chris cheers, Chris Chris ___ 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] zpatterns: rackmountables must be of-wrapped
At 05:33 PM 5/24/00 +0400, Jephte CLAIN wrote: Hello, I believe items got from a rack have to be wrapped in context of the rack. I've been bitten by this (and it hurts!). When I try to use items from DTML, only the superuser can use it, even managers can't access the objects. When I wrap the items in the context of the rack, everything is fine. So: retrieveItem, createItem use vanilla objects retrieveItem and createItem are not intended to be public methods; the only reason they don't begin with an "_" is that I wanted to make it possible for them to be implemented as DTMLMethods or PythonMethods. getItem, newItem wrap objects before returning them These are the API's you should be using, as they are the ones that tell the rackmountable what rack it belongs to. ___ 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] Problems with LoginManager form-based login
At 05:24 PM 5/24/00 +0300, Itamar Shtull-Trauring wrote: "Phillip J. Eby" wrote: Make your root acl_users a LoginManager, with the loginForm there. LoginManager will only allow "Anonymous" to log in if it is the root acl_users. This is how standard user folders behave, and *have to* because of the way manage_workspace works, unfortunately. Until/unless a new login protocol is worked out in Zope, this is the workaround. But this user isn't even supposed to access manage_workspace - I just need it to access a PTK join_form so it can become a member. I tried making loginForm on the top level display a dtml method customLoginForm (which contains the actual form), and then override it in the PTK folder, but it doesn't - it displays the one on the top level. And I can't use the same loginForm in the whole site, because I may have few portals, and I need the login form to say "if you are not a member you can join here". Any ideas? This is a problem that apparently can only be solved by replicating ZPublisher's backward walk, which is the wrong thing to do because the traversal will be O(n^2). Bleah. I guess we'll have to do something like Stuart Bishop's backward walk in the GUF, since any enhancement of the ZPublisher architecture to handle login forms properly won't happen until at least 2.2. Meanwhile, I suppose Ty and I should try to come up with a proposal for revising ZPublisher to be able to walk back on the user lookups but still use the login form closest to the URL being accessed. ___ 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] Problems with LoginManager form-based login
- Original Message - From: "Phillip J. Eby" [EMAIL PROTECTED] To: "Itamar Shtull-Trauring" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, May 24, 2000 9:59 AM Subject: Re: [Zope-dev] Problems with LoginManager form-based login Make your root acl_users a LoginManager, with the loginForm there. LoginManager will only allow "Anonymous" to log in if it is the root acl_users. This is how standard user folders behave, and *have to* because of the way manage_workspace works, unfortunately. Until/unless a new login protocol is worked out in Zope, this is the workaround. Can you make the root acl_users a LoginManager now? (Is that in 2.1.6 or the CVS version?) I know that the new ownership stuff made this impossible to do in the CVS version (unless that's already been changed...) Kevin ___ 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] Re: ZCatalog and Unique IDs
Chris Withers wrote: Hi, I hope this is a stupid question but why does ZCatalog use the URL of an object to uniquely identify it? Because it's unique. Why not just use a reference to the object? How do you define that? If you mean reference in the strictly python sense, then I guess you're thinking about some kind of name or dictionary key in the catalog that is directly assigned the value of the observed object? This sorta gets back to the symbolic link vs. hard link analogies brought up in the past. Both have their dificulties, you cannot, for example, have a reference across databases, while you can map the physical path. Using a string like this could also allow you to quickly modify the catalog to index external resources. Persistent object identifiers must exist for the ZODB so why not use them instead? They change, I believe, over the revisions of the objects; and also this is a very low level identifier. I'm not certain. I think this attribute is _p_oid. cheers, Chris PS: This would solve all the problems with ZCatalogs and virtually hosted sites... So would a solid traversal interface that understood virtual hosting in Zope. I think the traversal interface is needed for other reasons but it should remove ZCatalog from the list of things that need it... not that I've just been bitten by this or anything ;-) I understand, but I think most of the biting was due to bugs than a flaw in the model. -- -Michel Pelletier http://www.zope.org/Members/michel/MyWiki Visit WikiCentral for the latest Zen: http://www.zope.org/Members/WikiCentral ___ 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] [Fwd: ZCatalog.. Again.. I know..]
Michel Pelletier wrote: I'm looking into this right now... Many thanks :-) As you may have gathered from my posts, I've been having a bit of a ZCatalog/SiteAccess (not to mention MIME) nightmare today... ...I took a day off work to try and get Squishdot 0.4.0 out and have spent the day tryign to figure out whether or not it's my that that's $"£$ed All I'd like to know is: Is ZCatalog in 2.1.6 likely to return incorrect search results, or is it my python code that's broken? In either case, how do I fix it? ;-) cheers, Chris PS: My code, that may be broken... data is an IOBTree for id--Posting objects. Could there be any untoward aquisition going on here? Posting acquires from Implicit. def recatalogPostings(self,REQUEST=None): """ Clear the Catalog and then Index all the postings. """ self._catalog.clear() for id in self.data.keys(): obj = self.data[id] self.catalog_object(obj,self.absolute_url(1)+ obj.thread_path()+ '/' + `id`) return self.manage_postings(self, REQUEST) The index which is causing the problem is 'textToSearch' which is supplied by the following function: def textToSearch(self): """# returns the text to search for a ZCatalog""" text='' for line in self.summary: # strip out HTML and append a newline to each line. text = text+tagRegex.sub("",line)+'\n' for line in self.body: # strip out HTML and append a newline to each line. text = text+tagRegex.sub("",line)+'\n' return text ___ 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] Re: ZCVS Mixin class... feedback sought.
Jerry Spicklemire wrote: [snip] Steve, please clarify any of the concepts I've managed to mangle! Now this sounds like something I waffled about a few weeks back... ...cool :-) I don't think I'm gonna have a chance to play though :S I'll jump in at 1.0.0 though and I'm there in spirit now ;-) Good luck, Chris ___ 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] ZCVS Mixin class... feedback sought.
Hi Jerry, (in case you're wondering.. Jerry really *is* my brother..) "JS" == Jerry Spicklemire [EMAIL PROTECTED] writes: JS Chris Withers wrote: Sounds like a cool idea, but I don't really understand what it does and how you use it. Could you give use some enlightenment? JS ZCVSMixin is a sort of replacement for a standard Zope Folder JS Object. If you want to be able to maintain an entire Zope JS Folder (and everything in it) in CVS, use a ZCVSMixin Object JS instead. Then, from the Manage view, you get a new tab showing JS up that provides the interaction with CVS. That's basically right. Technically there are two parts. ZCVSMixin is a python "Product" that handles talking to CVS and importing and exporting objects. There is also a ZClass that inherits from both Folder, and ZCVSMixin to provide Folder behavior and methods while adding CVS support, hence the name Mixin. I believe you could really use the 'Mixin' to add CVS support to any subclass of ObjectManager, in a similar way. JS What it actually does is an Export as XML on the whole JS "folder", which then can be stored, view, checked out, checked JS back in, and otherwise thoroughly managed and maintained JS within CVS. For developers that are deep into Zope, and JS familiar with CVS, this represents some potent possibilites. Well.. close! It exports and imports all the objects in the folder individually. This way I can edit one method, then 'checkin' that change with CVS. Anyone else with access to my repository can do a 'checkout' from their Zope and get all the latest versions of my objects in their zope. Think of it as the public CVS that CD uses now to publish Zope itself, but taken to the level of tracking individual zope objects contained in Zope folders. I've just been playing with it.. and you can sorta get the idea looking at: http://cvs.spvi.com/cgi-bin/viewcvs.cgi/zopeObjs/testCVS/ With CVS you can tag revisions etc and take a snapshot in time of your zope objects, just like we do now with source code. JS Think about checking out a Zope Widget from a CVS on the other JS side of the planet, importing as XML into your local Zope, JS where it is marshalled back from its CVSish XML form into the JS original native Zope self. Now you can tweek it to your hearts JS content, export as XML, then check the updated version back JS in, where it becomes part of the trackable, archived, JS searchable CVS system. Right... that's the idea. JS Steve, please clarify any of the concepts I've managed to JS mangle! Hope that helps It's really shocking just how easy it was to do this makes me wonder why it hasn't been done already, and *that* makes me wonder if I'm doing something really dumb here. ;-) It seems kinda cool to me. -steve ___ 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] ZCVS Mixin class... feedback sought.
Steve Spicklemire wrote: Hope that helps It's really shocking just how easy it was to do this makes me wonder why it hasn't been done already, and *that* makes me wonder if I'm doing something really dumb here. ;-) It seems kinda cool to me. I find that the same phenomenon keeps occurring for the things I've been doing as well. Transparent folders, product refresh, and even mounted databases all turned out to be a lot simpler than anyone thought they would be. Makes it fun to be a software engineer, don't you think? Shane ___ 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] Cannot rename or move my ZClass object
I have derived a ZClass from the Folder base class and it works great, except I cannot rename or move my ZClass. How can I fix this? -L ___ 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] ZCVS Mixin class... feedback sought.
Just curious. How do you do diffs? How do you resolve conflicts? How do you handle login/logout? --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ___ 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] Observer / Notification Interface Proposal
At 07:19 PM 5/24/00 -0400, Tres Seaver wrote: I have started a page for an implementation of the GangOfFour Observer pattern within Zope: URL http://www.zope.org/Members/michel/Projects/Interfaces/ObserverAndNotificat ion Please comment, either here or in the wiki. Is this only for events occurring within a transaction, or across transactions? If across transactions, how do you intend to handle persistent references, acquisition, and cross-database references? (My suggestion would be to use a path to the callable.) Second, I think there should be an opportunity for the observer to specify more detail about what it wants to be called *for*. I.e., either a specific event or an event mask, to avoid unnecessary calls for irrelevant events. I realize this is all very implementation oriented, but that's me. :) (Oh, btw on "ObserverInterface", I'm guessing you mean the contract requires that *observable* not worry about delays, not the other way around.) ___ 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] Observer / Notification Interface Proposal
"Phillip J. Eby" wrote: Is this only for events occurring within a transaction, or across transactions? If across transactions, how do you intend to handle persistent references, acquisition, and cross-database references? (My suggestion would be to use a path to the callable.) Note that the scaling requirement (no blocking/long-running actions inside the notification call) is intended to support intra-request notification. A ConcreteObserver implementation which needs to perform such work (e.g., send an e-mail message, etc.) will have to extract whatever data it needs from the subject and enqueue it for processing in some other thread, by the asyncore machinery, etc. Note as well that it would be possible to install an Observer which could "veto" the change by raising an exception (a clever ConcreteSubject might ignore such a veto, of course). I'm don't have any use case in mind for a cross-transaction "event". Second, I think there should be an opportunity for the observer to specify more detail about what it wants to be called *for*. I.e., either a specific event or an event mask, to avoid unnecessary calls for irrelevant events. I considered this, and decided that it would be simpler to put the EventFilter in a "shim" object (e.g. a high-pass filter) which would sit between the actual subject and observer. Consider stringing together a shell pipeline, e.g.:: ps -aux | grep tseaver | . | sort" Each piece has a very limited set of responsibilities, but stringing them together arbitrarily conveys enormous power. I also have hopes for a set of federated, filterable NotificationChannels (like CORBA's NotificationService) which would allow Observer-in-Zope to scale up enormously. I realize this is all very implementation oriented, but that's me. :) (Oh, btw on "ObserverInterface", I'm guessing you mean the contract requires that *observable* not worry about delays, not the other way around.) Changed it to 'subject' -- thanks for pointing it out! Thanks for the feedback! Tres. -- === Tres Seaver[EMAIL PROTECTED] Digital Creations"Zope Dealers"http://www.zope.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] ZCVS Mixin class... feedback sought.
Good questions! You can just go to the 'admin' tab and type 'diff'. The admin tab lets you execute just about any cvs command with arguments stat, rtag etc etc. Doing a diff on a zexp file isn't going to be very helpful, though. Any thoughts on integrating some sort of xml diff tool? Conflicts.. uh... bad news. ;-) I think it's essentially impossible to 'merge' two different versions of a zope object... so my plan would be to pick one version, or the other. Login and logout are handled when you set up the directory on the filesystem. Basically you need to 'checkout' a module (maybe an empty module) into a directory on the filesystem before you can use it to keep the xml representations of your Zope objects. That checkout, might, or might not, require a login, depending on your CVSROOT. You must 'be' the zope user (the same user that the zope process runs as) when you checkout the module, so that zope can manage the contents. So essentially all checkins are by the same cvs user, so you lose the ability to track accountability? I'd like to see something that was on a per-user basis, maybe tied to the zope user, maybe not. There's been a ton of talk about a zope cvs product. I've been thinking about giving it a shot for a while now. I'm excited to see someone actually doing something about it. I'd be glad to help out however I can. Especially since now you've taken the killer name. ;) --jfarr ___ 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] FWIW, ZCVSMixin now at 0.0.2... and rising. ;-)
Steve Spicklemire wrote: I've not heard any comments about the usefulness of this concept... am I barking up the wrong tree to get version control of zope objects? Does someone know of a better way? Steve, this has been my fondest hope for about three months now. Now, if I could also get it to do through-the-web XML (DocBook) editing and rendering, I'd have a complete end-to-end document management system. Particularly if it preserved accountability, like Jonothan was mentioning. I'll be testing this tommorow, and doing my best to get this to do unnatural things with XMLWidgets and DocBookDocument. Many thanks, Michael Bernstein. ___ 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] eat our own unsupported dog food
Michel Pelletier wrote: There is a recent need for us to install ZDiscussions on Zope.org. I have verified that 0.1.0 works with 2.1.6, but I can't seem to d/l 0.2.0. The author of said software is not available, any one know the status on ZDiscussions? Has any one tweaked it? I found this: http://www.zope.org/Members/BwanaZulia/ZUBB/ HTH, Michael Bernstein. ___ 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] Netscape Image Problems (LoginManager?)
[EMAIL PROTECTED] wrote: Using the %{If-Modified-Since}i directive in the Apache log, we have been able to confirm that Netscape 3.01 and 4.06 on Win32 are sending If-Modified-Since with "16-May-00" type dates. Dieter's solution indeed fixes the problem by removing the Overflow error that they cause when the int() function is called on them. I noticed that Zope 2.1.4 does not have these int() calls in the offending section of lib/python/OFS/Image.py but they are present in 2.1.6. Why were they introduced on the latter version? Can they be removed in future versions? No, they can't - HTTP datetime headers specify time in whole seconds, while the time() function on Unix machines returns time with a floating point time. In order for Zope to work correctly the you have to make timeTime()'s result be a whole number. long() would be fine though, or floor(). -- Itamar S.T. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Article: Zope - a Swiss Army Knife for the Web?
I'm a bit shy about this article amongst hardened Zopistas as it shows that I'm only just reaching the steep part of the learning cliff having wandered through the gentler foothills over the last year. The article was written at the end of 1999 and has yet to appear in print (and is dating rapidly). So I'm casting etiquette aside and broadcasting its whereabouts generally. It will not give Zopistas any new insights but it might help them in the cause of persuading others on board (which was my motivation for writing the article in the first place). A pointer is now at: http://www.zope.org/Members/glpb Paul -- The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK E-mail: [EMAIL PROTECTED] URL: http://www.bris.ac.uk/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Discussion board with e-mail notification?
Hi. I need a quick fix. The Confera Product I'm using offers a "Notify me via email of responses to this message" check box if a MailHost object is present in the folder BUT doesn't actually work (for me anyway). Question 1: Anyone fixed this or got it working anyway? Question 2: Is there a Zope product that offers a discussion board with working e-mail notification? Many TIAs. Paul -- The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK E-mail: [EMAIL PROTECTED] URL: http://www.bris.ac.uk/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Feedback Requested: Editor Applet for Zope?
On Tue, 23 May 2000, Heiko Stoermer wrote: I've been working with Zope for quite some time now, and one point that always slows me down is DTML or SQL source editing in the well-known wonderful textboxes. You all like them... My question: Do you like the idea of having a slim java-based editor applet instead of the textarea? (NO, not a 400k editor with WYSIWYG preview and an exotic scripting engine - it's supposed to be _very_ slim) Please give me feedback on this, because if the community wants such a thing, I might start working on it. I would love one. If you you proceed, it would be nice if the applet allowed pluggable backends. In this way, one applet would exist that would allow the user to select one of a number of different editors to use (which should keep the Brief users, the Emacs users, the Notepad users and the Vi users all happy - provided they can be bothered implementing their own backend). -- ___ // Zen (alias Stuart Bishop) Work: [EMAIL PROTECTED] // E N Senior Systems Alchemist Play: [EMAIL PROTECTED] //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Running multiple instances of Zope with SSL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm thinking of doing this ( on an NT box ), and was wondering what the easiest way to do this was ... Roxen? Apache? NT Server? - -- Regards, Graham Chiu gchiuatcompkarori.co.nz http://www.compkarori.co.nz/index.php Powered by Interbase and Zope -BEGIN PGP SIGNATURE- Version: PGPsdk version 1.7.1 iQA/AwUBOSr0l7TRdIWzaLpMEQIG5gCgvGbsLu2xIGHANQA0xqpIkFFtKHsAoM+A EWryGQvuKA2WOmNNKD/1IXk7 =63Xp -END PGP SIGNATURE- ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Feeling like a newbie.. document id if statement?
Ok.. this is really dumb, but for some reason I can't get this to work. dtml-if "id=='index_html'" do something cool /dtml-if What am I missing? I tried it on a few pages.. nothing.. Thanks, J (duffus) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question: case sensitive folder problem
create an other object (DTML Method) called bigfolder with these contents (untested): dtml-call "RESPONSE.redirect('BigFolder')" - Original Message - From: "Alexander N Gould" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 24, 2000 12:43 PM Subject: [Zope] newbie question: case sensitive folder problem How can I make a folder on my site case - insensitive in regards to access from URLs. If someone types http://mysite.com/bigfolder/ into their browser, I want it to take them to the Bigfolder, but right now, it produces a missing object error. Any hints? Sorry if this is a silly question - I'm just getting started here. I use zope with pcgi on Apache. -- Building highways to reduce traffic is like loosening your belt to reduce obesity ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Feeling like a newbie.. document id if statement?
J, You may not be as dumb as you think. If I recall correctly, id is one of those strange fish which is sometimes string and sometimes method. So if in your case it is a method then id=='anything' will always be false. Try id()=='index_html'. hth Phil [EMAIL PROTECTED] - Original Message - From: "J. Atwood" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 24, 2000 12:59 PM Subject: [Zope] Feeling like a newbie.. document id if statement? Ok.. this is really dumb, but for some reason I can't get this to work. dtml-if "id=='index_html'" do something cool /dtml-if What am I missing? I tried it on a few pages.. nothing.. Thanks, J (duffus) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] newbie question: case sensitive folder problem
Alexander N Gould wrote: How can I make a folder on my site case - insensitive in regards to access from URLs. If someone types http://mysite.com/bigfolder/ into their browser, I want it to take them to the Bigfolder, but right now, it produces a missing object error. Any hints? Sorry if this is a silly question - I'm just getting started here. I use zope with pcgi on Apache. You can solve this using a DTML method called bigfolder: dtml-call "RESPONSE.setBase(Bigfolder.absolute_url())" dtml-with Bigfolder dtml-var index_html /dtml-with However, this won't help you if you want things to be totally case-insensitive, like having "bIgFolDer" direct to "Bigfolder" for example. -- Steve Alexander Software Engineer Cat-Box limited ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Building ZPatterns
Oliver Maunder wrote: I'm trying to install ZPatterns 0.3.0 on an NT system and I've come across problems building the dynpersist C extension. Someone posted the compile dynpersist to Zope-PTK or maybe devel yesterday. -- Itamar S.T. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] newbie question: case sensitive folder problem
You could try using Apache rewrite rules to convert all URL's to lower case, and then use only lower case names for your folders, documents and methods. As long as the case is consistent, one rewrite rule should cover everything. hth, -- Marcus -Original Message- From: Alexander N Gould [mailto:[EMAIL PROTECTED]] Sent: 24 May 2000 13:43 To: [EMAIL PROTECTED] Subject: [Zope] newbie question: case sensitive folder problem How can I make a folder on my site case - insensitive in regards to access from URLs. If someone types http://mysite.com/bigfolder/ into their browser, I want it to take them to the Bigfolder, but right now, it produces a missing object error. Any hints? Sorry if this is a silly question - I'm just getting started here. I use zope with pcgi on Apache. -- Building highways to reduce traffic is like loosening your belt to reduce obesity ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Feeling like a newbie.. document id if statement?
- Original Message - From: Timothy Wilson [EMAIL PROTECTED] On Wed, 24 May 2000, Rik Hoekstra wrote: .. Ok.. this is really dumb, but for some reason I can't get this to work. dtml-if "id=='index_html'" I believe this should be dtml-if "_['id']=='index_html'" I wonder if someone would be kind enough to translate Rik's code into Enlish for me. I know that expressions inside "" are Python, but what is the function of the [] and _? The special "namespace" variable, "_" It is useful to access the variables with special names, like "sequence-index" For example: dtml-if "sequence-index==3" will not work "sequence MINUS index==3" :-) You have to use dtml-if "_['sequence-index']==3" In fact "_['id']" is the some thing with "id" , I presume (or maybe I'm wrong). so, is no difference between dtml-if "id=='index_html'" dtml-if "_['id']=='index_html'" Find more @: http://www.zope.org/Documentation/Guides/DTML-HTML/DTML.5.3.2.3.html Marcel ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Feeling like a newbie.. document id if statement?
dtml-if "_['id']=='index_html'" I wonder if someone would be kind enough to translate Rik's code into Enlish for me. I know that expressions inside "" are Python, but what is the function of the [] and _? Hm, I'm afraid this is a DTML trick (nothing more). I hope I can explain this right. Please correct me if I go wrong. Normally in DTML, you access variables in the current namespace with dtml-var id, which actually stands for dtml-var name="id" In an expression like the one used by J you actually use an expression, like dtml-var expr="id", in which case you do not get the id variable in the current namespace, but the actual value of the id attribute (property) of the object in the current namespace. The problem here is that the id of index_html is a python method (which is actually returned by dtml-var expr="id"). This will never be equal to 'index_html' as that is a string. The solution is to call the variable in the current object namespace by using it like a dictionary in the python expression dtml-var expr="_['id']". Because it's a method, you could (in this case) also use dtml-var expr="id()", in which case a string is returned (so that dtml-if expr="id()=='index_html'" will once again be useful. However, the _['id'] is preferred, because it will work on different objects and the id of most other objects is a string. For example: dtml-in "objectValues(['DTML Method', 'File'])" dtml-if "_['id'] == 'somestring'" do something nice /dtml-if /dtml-in would work, whereas dtml-if "id() == 'somestring'" would break if there are objects whose ids are not methods (assuming File is one of them, which I wouldn't know) So the different forms are (actually there are some more, but they do not matter here): dtml-var id dtml-var "id" dtml-var "_['id']" dtml-var "id()" dtml-var "_[id]" will give you an error Now that was probably more English than you'd hoped for hth Rik ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Good news for Zope/Mozilla efforts!
Looks like we really will be seeing Python support in Mozilla one of these days! Soon? http://www.newsalert.com/bin/story?StoryId=CosTtWbKbytaXodG ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] How to know the number of parents of an element ???
Hi all, Is there any function or method to get the number of parents of an element ? Thanks for your help, Frederic ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] HELP: problems with ZServer Medusa!
Hi All, I have installed Zope on a Linux server (Slackware 7.0) apparently without problems; but, when I start the server with the command: ./start, I have in continuous this message error: -- INFO(0) ZServer Monitor Server (V.1.6) started on port 8099 Raceback (innermost last): File "/usr/Zope-2.2.0a1-src/z2.py", line 698, in ? pf=open(PID_FILE, 'w') IOError: [Errno 13] Permission denied '/usr/Zope-2.2.0a1-src/var/z2.pid' -- Thanks. Jilani -- jk ___ http://space.tin.it/scuola/jkhaldi ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] still trying to get Catalog to work in my python product
- Original Message - From: "ed colmar" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 23, 2000 11:54 AM Subject: [Zope] still trying to get Catalog to work in my python product After looking over the PTK snapshot, I've tried to duplicate the catlog that is implemented there. I could not find any search utilities built in, so I'm assuming this is still done by adding the ZsearchInterface from the management screen. Is this right, or is there some built-in PTK searching tool? ZSearchInterface is basically just a quickie tool to generate DTML Methods. You can always make the DTML on your own... it's really not too difficult to do searching of a ZCatalog (there are a couple related howtos on zope.org). Kevin ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope with FreeBSD
On Wed, 24 May 2000, Jilani Khaldi wrote: did somebody try to use Zope with FreeBSD with success? Many people, many times. What is your problem? Common sources of confusions on FreeBSD: slightly different (more strict) locale (you may need to compile Zope with all char* being unsigned char*); parser module or sha module are not installed - just install them yourself. Other problem? Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [Zope-Moz] Good news for Zope/Mozilla efforts!
On Wed, May 24, 2000 at 10:11:48AM -0400, Dan L. Pierson wrote: Looks like we really will be seeing Python support in Mozilla one of these days! Soon? http://www.newsalert.com/bin/story?StoryId=CosTtWbKbytaXodG Ah good! It's good to see David Ascher can now work more in the open on this. Integrating other scripting languages in Mozilla was considered tricky if not impossible, but I believe that switching the DOM to using xpidl is helping here. I have no idea how long this is going to take to do however. -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Using Cookie Data
I have a cookie that contains the value of an psql key as its value. I want to retrieve the value and use it to call the psql query method to retrieve the data. The code that I am currently using is dtml-in qryGetCustomer(REQUEST.cookies[Company_Name)] The company record has been retrieved for dtml-var company_name.br /dtml-in where Company_Name is a property containing the company name and is the name of the cookie, and company_name is the first field that should be retrieved from the psql database query. When I run the code I get Error Type: KeyError Error Value: qryGetCustomer(REQUEST.cookies[Company_Name)] Any help out there on helping a Zope newbie to get the data from his psql database with a value retrieved from a cookie? -- Jim Zope is cool! ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: [Zope-Moz] Good news for Zope/Mozilla efforts!
Ah good! It's good to see David Ascher can now work more in the open on this. Indeed. I've been chomping at the bit! Integrating other scripting languages in Mozilla was considered tricky if not impossible, but I believe that switching the DOM to using xpidl is helping here. I have no idea how long this is going to take to do however. There are two levels of integration of other scripting languages, one easier than the other. We'll be tackling the ability to make XPCOM components in Python and Perl first. This doesn't allow the use of those languages in a XUL file, however, as that requires architectural changes to the Mozilla core. We will be working with Netscape to solve that problem as well, but not in the short term. Nevertheless, I think you'll be pleased to see what can be accomplished with Python and Perl components... -- David Ascher Activestate www.activestate.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Using Cookie Data
Jim wrote: I have a cookie that contains the value of an psql key as its value. I want to retrieve the value and use it to call the psql query method to retrieve the data. The code that I am currently using is dtml-in qryGetCustomer(REQUEST.cookies[Company_Name)] try quotes: dtml-in "qryGetCustomer(REQUEST.cookies[Company_Name])" The company record has been retrieved for dtml-var company_name.br /dtml-in - Hannu ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Medusa vs. Apache
Hi All, I wonder if it is more convenient to stay with Apache or to move to Medusa a best use of Zope? Thanks. Jilani -- jk ___ http://space.tin.it/scuola/jkhaldi FreeBSD ~ The Power To Serve ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] HELP: problems with ZServer Medusa!
does /usr/Zope-2.2.0a1-src/var/z2.pid exist? if not, touch z2.pid and try again. seb. Hi All, I have installed Zope on a Linux server (Slackware 7.0) apparently without problems; but, when I start the server with the command: ./start, I have in continuous this message error: -- INFO(0) ZServer Monitor Server (V.1.6) started on port 8099 Raceback (innermost last): File "/usr/Zope-2.2.0a1-src/z2.py", line 698, in ? pf=open(PID_FILE, 'w') IOError: [Errno 13] Permission denied '/usr/Zope-2.2.0a1-src/var/z2.pid' ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Medusa vs. Apache
Hi All, I wonder if it is more convenient to stay with Apache or to move to Medusa for a best use of Zope? If you don't need any of the Apache features go with ZServer/Medusa. -Petru ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] seq-items and nested dtml-ins
How do you differentiate between the seq-items of nested dtml-ins? I tried the following code: dtml-in "instances.objectValues(['Coupon ZClass'])" dtml-in SearchCategory dtml-if "_['sequence-item']=='Auto' " dtml-call "resultsList.append(_['sequence-item'])" /dtml-if /dtml-in end SearchCategory /dtml-in end instances Where: instances is a folder containing the coupon instances Coupon ZClass is the meta type of the zclass SearchCategory is a list from a form resultsList is a list containing instances of Coupon ZClass matching the search criteria Auto is a property of Coupon ZClass When I try to run a search an error page pops up saying "strings aren't allowed as input in the in tag." The property Category of the zclass is the type lines. "Auto' is one of the values in Category. In dtml-if "_['sequence-item']=='Auto' " I am comparing the current element of SearchCategory to one of the values in Category. In dtml-call resultsList... I want to append the instance and not SearchCategory list. Peacefully, Aaron ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Importing a 2.1 .zexp file into 2.2
I'm trying to import the KM|net News product into my CVS Zope (just updated it a moment ago, with no luck). I get the following error: STRONGError Type: InvalidObjectReference/STRONGBR STRONGError Value: Attempt to store a wrapped persistent object/STRONGBR Traceback (innermost last): File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 224, in publish_module File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 189, in publish File /home/kid/Zope2/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: ElementWithAttributes) File /home/kid/Zope2/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/kid/Zope2/lib/python/ZODB/Transaction.py, line 237, in commit File /home/kid/Zope2/lib/python/ZODB/Connection.py, line 332, in commit (Info: (('OFS.Application', 'Application'), '\000\000\000\000\000\000\000\002', '')) InvalidObjectReference: (see above) Any ideas? Is anyone able to import this? Kevin http://www.byproducts.com - Humor and Novelties ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] HELP: problems with ZServer Medusa!
Check the permissions on the var directory. J From: Seb Bacon [EMAIL PROTECTED] Date: Wed, 24 May 2000 19:04:00 +0100 To: [EMAIL PROTECTED] Subject: RE: [Zope] HELP: problems with ZServer Medusa! does /usr/Zope-2.2.0a1-src/var/z2.pid exist? if not, touch z2.pid and try again. seb. Hi All, I have installed Zope on a Linux server (Slackware 7.0) apparently without problems; but, when I start the server with the command: ./start, I have in continuous this message error: -- INFO(0) ZServer Monitor Server (V.1.6) started on port 8099 Raceback (innermost last): File "/usr/Zope-2.2.0a1-src/z2.py", line 698, in ? pf=open(PID_FILE, 'w') IOError: [Errno 13] Permission denied '/usr/Zope-2.2.0a1-src/var/z2.pid' ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Collector status on password change bug?
I see that the "Can't change User Roles without their Password" bug mentioned in: http://classic.zope.org:8080/Collector/1102/view http://classic.zope.org:8080/Collector/1134/view http://classic.zope.org:8080/Collector/1138/view (etc) is still in 2.1.6 http://classic.zope.org:8080/Collector/1138/view provides a patch. What is the recommended way to solve this long-standing problem? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Passing multi-line field into SQL
You enter a line break by pressing the Enter key! We are using Gadfly for right now, until our Oracle db server is set up. We actually found a solution: dtml-var "'\''"dtml-var "_.string.replace(description ,'\n','br')" sql_quotedtml-var "'\''", Kind of ugly, but it works. I imagine there are more elegant solutions. Note that I used dtml-var to produce a single quote to avoid nasty nested quote issues. ..tony.. = In article [EMAIL PROTECTED], Tony Mann [EMAIL PROTECTED] writes We have a form with a textarea on it, that can contain line breaks. When we try to pass it into an SQL statement How do you enter line breaks into a text area? What database adapter are you using? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] Collector status on password change bug?
I see that the "Can't change User Roles without their Password" bug mentioned in: http://classic.zope.org:8080/Collector/1102/view http://classic.zope.org:8080/Collector/1134/view http://classic.zope.org:8080/Collector/1138/view (etc) is still in 2.1.6 http://classic.zope.org:8080/Collector/1138/view provides a patch. What is the recommended way to solve this long-standing problem? Kent - the fix for this is in the forthcoming 2.2. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] The agony of the ZOPE Documentation
I'm sorry, but I have to say, the ZOPE documentation, despite efforts to improve it, is absolutely, positively horrible. Not because the content isn't there, but because the tools to access it simply suck. I can type in searches on both zope.org and zdp.zope.org and though I KNOW the information is there, I can't get the results I want! Constantly, when I am recommending ZOPE to people, the ONE thing I and they complain about is the horrible documentation! Is there some way that I can get a copy of all of the FAQ's, HOW-TOs, Ref manuals, etc in some kind of raw ASCII text format or HTML or something, so that I can build some kind of useful search engine for this stuff? The search engines on www.zope.org and zdp.zope.org just plain suck. Additionally, the zdp web site is a real nice idea that is SO poorly executed IMO as to make it totally unusable. You can't even browse the documentation without clicking through a thousand different links. (I can give you specific examples of how to improve the site if you want.) Please, anyone? Save Zope's documentation! -- Some husbands are living proof that a woman can take a joke. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: [Zope-Moz] Good news for Zope/Mozilla efforts!
David was going to check to see if the embedded Python could import C extensions. If it could, I know of a little object publishing environment that could run in Mozilla. :^) --Paul -Original Message- From: Martijn Pieters [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 24, 2000 2:42 PM To: David Ascher Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [Zope-Moz] Good news for Zope/Mozilla efforts! On Wed, May 24, 2000 at 10:22:26AM -0700, David Ascher wrote: There are two levels of integration of other scripting languages, one easier than the other. We'll be tackling the ability to make XPCOM components in Python and Perl first. This doesn't allow the use of those languages in a XUL file, however, as that requires architectural changes to the Mozilla core. We will be working with Netscape to solve that problem as well, but not in the short term. Nevertheless, I think you'll be pleased to see what can be accomplished with Python and Perl components... Stop it, you have me drooling already! I take it Python will not loose it's ability to import other Python modules. A decent XML-Parser at last! -- Martijn Pieters | Software Engineermailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server - ___ Zope-Mozilla maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-mozilla ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] The agony of the ZOPE Documentation
[EMAIL PROTECTED] wrote: I'm sorry, but I have to say, the ZOPE documentation, despite efforts to improve it, is absolutely, positively horrible. Not because the content isn't there, but because the tools to access it simply suck. Gotta agree with this :( Additionally, the zdp web site is a real nice idea that is SO poorly executed IMO as to make it totally unusable. ZDP is currently undergoing a lot of development and unfortunately I have to agree that it isn't there yet... Unfortunately, no-one is getting paid to do it, and everyone who is working on it would probably get fired if they spent enough time on it to REALLY get the job done... I reckon there's about 25 man weeks of work to do based on 5 people spending: -1 week to build the tools -1 week to plan the structure of the documentation -3 weeks to get ALL the Zope documentation linked in one place (which is what zdp is supposed to be...) So, has anyone got the cash? ;-) Once this is done, it will be less work to keep that documentation up to date. Hopefully, eventually, all documentation would end up on zdp.zope.org and not just be linked from it... You can't even browse the documentation without clicking through a thousand different links. I agree here too :( (I can give you specific examples of how to improve the site if you want.) Send them to [EMAIL PROTECTED], in fact, better still, JOIN [EMAIL PROTECTED] and go and make the changes yourself :-) Good luck, I think you're (or should that be 'we're all') going to need it... Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: [Zope-Moz] Good news for Zope/Mozilla efforts!
David Ascher writes: There are two levels of integration of other scripting languages, one easier than the other. We'll be tackling the ability to make XPCOM components in Python and Perl first. Would you please expand on the "make XPCOM components" task. By this are you adding new components, written in Python, that will be accessible through the XPCOM interface? Would these components be constructed in Python from components interfaces that are accessible through the XPCOM interface? If this isn't the case then is does this simply mean that Python can be used to assemble chrome using existing XPCOM components. Are you doing this by wrapping the the interface to the XPCOM Type Library or will you be parsing the XPIDL files directly. (Another interesting approach is the way the ORBit-Python project reads CORBA IDL files at run time and links directly to an ORBit ORB.) This doesn't allow the use of those languages in a XUL file, however, as that requires architectural changes to the Mozilla core. We will be working with Netscape to solve that problem as well, but not in the short term. Nevertheless, I think you'll be pleased to see what can be accomplished with Python and Perl components... By this do you mean that in the following XUL the value of "oncommand" cannot be python code? menuitem value="Mozilla Help" oncommand="window.openDialog('chrome://help/content/help.xul', '_blank', 'chrome,all,dialog=no')" / or are you talking about not being able to embed Python instead of javascript as in the following: script language="javascript" function doCMD(el) { v = el.getAttribute("value") if (v == "New") alert('New clicked') elsif (v == "Open") alert('Open clicked') else alert('Close clicked') } /script ... menu class="menu" value="File" oncommand="doCMD(event.target)" menupopup menuitem oncommand="alert('New item alert')" value="New" / menuitem value="Open" / menuitem oncommand="alert('Close handler')" value="Close" / /menupopup /menu Instead of using XUL to write the menuitem... definition from the first example or the menu... definition in the second example will it be possible to write the equivolent of the XUL completely in Python? That is, will the planned interface make it possible to build an XPCOM component based application, such as the Mozilla browser, entirely in Python. An interface between the Glade IDE and Mozilla has recently been checked into Sourceforge. The documentation on MozGlade is weak. The freshmeat announcment http://freshmeat.net/appindex/2000/05/16/958529719.html hints at the goal. The project looks like it might intersect with the goals of the Komono IDE project. Will there be a mailing list for the project? What is your best guess on when the "make XPCOM components" capability will be available for testing from the Mozilla CVS? ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Importing a 2.1 .zexp file into 2.2
Kevin Dangoor wrote: STRONGError Type: InvalidObjectReference/STRONGBR STRONGError Value: Attempt to store a wrapped persistent object/STRONGBR Apparently storing a wrapped object is a security hole, I bumped into a post about it in the collector after searching for ZCatalog... So, something, somewhere in your zexp has a wrapped object... cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Reloading products
newbie time: I'm trying to write a product AlbumImage which extends Image to include a thumbnail. I was determined to slog it out without begging for help, but I've come up against a very strange brick wall. I'm getting problems with an import statement at the beginning of my product from OFS.PropertyManager import PropertyManager now then. I originally mis-spelled PropertyManager 'PropertyManageer' and got a traceback telling me it didn't exist. Fine. I changed it to the correct spelling, stopped and started my zope (n.b. is there any way of reloading a product without the tedium of stopping and starting zope?), and it still said 'no module named PropertyManageer'. So I tried changing it to ProoopertyManager, restarted Zope and sure enough the error was 'no module named ProoopertyManager'. BUT...I changed it to PropertyManager again and the error was *still* 'no module named ProoopertyManager'. Any clues, anyone? -seb -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Lindell Alderman Sent: 24 May 2000 20:18 To: Zope Developers; Zope Users Subject: [Zope] Cannot rename or move my ZClass object I have derived a ZClass from the Folder base class and it works great, except I cannot rename or move my ZClass. How can I fix this? -L ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: [ZDP] Re: [Zope] The agony of the ZOPE Documentation
Hi ! Chris Withers wrote: [EMAIL PROTECTED] wrote: I'm sorry, but I have to say, the ZOPE documentation, despite efforts to improve it, is absolutely, positively horrible. Not because the content isn't there, but because the tools to access it simply suck. Gotta agree with this :( Have you seen the logo of the ZDP site ? ;-) Additionally, the zdp web site is a real nice idea that is SO poorly executed IMO as to make it totally unusable. Thanks for telling me what you think about the ZDP site. The portal is only 24 days old, and we still need to fill in all the subjects and topics. Do think that the basic idea of offering different portals for different communities (Beginners, Developers and so on) is a bad idea ? What do you think about the organisation in Subjects/Topics ? ZDP is currently undergoing a lot of development and unfortunately I have to agree that it isn't there yet... We desparately need people helping ! Unfortunately, no-one is getting paid to do it, and everyone who is working on it would probably get fired if they spent enough time on it to REALLY get the job done... The problem is that not all stakeholders are working on this together. The ZDP project has got another server than the main Zope site, and there are only a few spare time developers working on this site. If we could work together with Digital Creations and perhaps on the same server as Zope.org, things would be much easier ! I reckon there's about 25 man weeks of work to do based on 5 people spending: -1 week to build the tools -1 week to plan the structure of the documentation -3 weeks to get ALL the Zope documentation linked in one place (which is what zdp is supposed to be...) So, has anyone got the cash? ;-) This is a job that only DC can do right now. The ZDP has "only" got the aim to point to existing stuff. Restructuring the existing docs is not our job. Once this is done, it will be less work to keep that documentation up to date. Hopefully, eventually, all documentation would end up on zdp.zope.org and not just be linked from it... At least we can dream, can't we ? ;-) You can't even browse the documentation without clicking through a thousand different links. I agree here too :( What documentation do you mean ? (I can give you specific examples of how to improve the site if you want.) I really want to hear all your ideas ! Send them to [EMAIL PROTECTED], in fact, better still, JOIN [EMAIL PROTECTED] and go and make the changes yourself :-) It would be nice to get some help from the whole Zope community. Anyone who would like to give some ideas is more than welcome ! Greetings, Maik Röder -- Open Source is "about being able to work together with people you've never met, on projects that are in a constant state of flux, on a time schedule that would cause a hummingbird's head to spin." Paul Ferris, http://www.linuxplanet.com/linuxplanet/opinions/1593/1/ ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Reloading products
Seb Bacon wrote: (n.b. is there any way of reloading a product without the tedium of stopping and starting zope?) There is a very-alpha product for doing this floating around on the zope-dev list. check the archives... Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] RE: [Zope-Moz] Good news for Zope/Mozilla efforts!
Hi Michael -- Would you please expand on the "make XPCOM components" task. I could, but you ask all the right questions, so I can just answer those. By this are you adding new components, written in Python, that will be accessible through the XPCOM interface? Yes. Would these components be constructed in Python from components interfaces that are accessible through the XPCOM interface? Yes. If this isn't the case then is does this simply mean that Python can be used to assemble chrome using existing XPCOM components. It is the case, so "no". I read that last sentence as "can you use Python to assemble existing components [written in e.g. C++]". While that is _a part_ of the capability we're talking about, we are also talking about the ability to have Python components act invisibly to the rest of Mozilla as full-fledged XPCOM components (much like existing C++ components currently). This is not unlike what one can do in PythonCOM currently in the Windows world. Are you doing this by wrapping the the interface to the XPCOM Type Library or will you be parsing the XPIDL files directly. (Another interesting approach is the way the ORBit-Python project reads CORBA IDL files at run time and links directly to an ORBit ORB.) The former. By this do you mean that in the following XUL the value of "oncommand" cannot be python code? menuitem value="Mozilla Help" oncommand="window.openDialog('chrome://help/content/help.xul', '_blank', 'chrome,all,dialog=no')" / Correct. or are you talking about not being able to embed Python instead of javascript as in the following: script language="javascript" function doCMD(el) { v = el.getAttribute("value") if (v == "New") alert('New clicked') elsif (v == "Open") alert('Open clicked') else alert('Close clicked') } /script ... menu class="menu" value="File" oncommand="doCMD(event.target)" menupopup menuitem oncommand="alert('New item alert')" value="New" / menuitem value="Open" / menuitem oncommand="alert('Close handler')" value="Close" / /menupopup /menu That too. Both of those (really the same feature) require considerable changes to the parser and to the DOM model, as documented in e.g. http://www.mozilla.org/scriptable/agnostic.html. Again, that is part of our long-term plan. Instead of using XUL to write the menuitem... definition from the first example or the menu... definition in the second example will it be possible to write the equivolent of the XUL completely in Python? That is, will the planned interface make it possible to build an XPCOM component based application, such as the Mozilla browser, entirely in Python. In the long term, yes -- but not in the short term. In the short term you'll have to use some JS in XUL files, although it will be able to reference and call and manipulate components written in Python outside of the XUL. An interface between the Glade IDE and Mozilla has recently been checked into Sourceforge. The documentation on MozGlade is weak. The freshmeat announcment http://freshmeat.net/appindex/2000/05/16/958529719.html hints at the goal. The project looks like it might intersect with the goals of the Komono IDE project. I'll look into it, thanks for the pointer. Will there be a mailing list for the project? We're still working out how to proceed with respect to working with folks outside of the company. I expect much of the discussion will take place on existing Mozilla newsgroups. What is your best guess on when the "make XPCOM components" capability will be available for testing from the Mozilla CVS? Sorry, I'm unable to give a best guess at this point with any meat behind it, especially when it involves integration with the main Mozilla tree, over which we have no control. While it's not a direct answer to your question, we are collecting email addresses of those who want to be notified when Komodo is ready (http://www.activestate.com/Products/Komodo.html). I hope the above is helpful. -- David Ascher PS: Wouldn't it make sense to trim the main Zope mailing list from this thread? I see it as being Mozilla-centric, not Zope-centric. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
RE: [Zope] 2.1.4 to 2.1.6 nightmare
Finally it works. Thanks. Do you know why DigitalCreations haven't release a patch? Dunno :S I guess i'm not the first one getting mad with 2.1.6. Had us fooled for about a week :( I think it's all fixed in 2.2 anyway, which may be why no patch was released... That's basically right - it boils down to that releasing a patch for every bug/feature just doesn't scale. We have made some internal adjustments to allow our release schedule to be much more flexible and frequent than it was, which should address this. Of course, if having every latest bug fix is of burning importance to you, you can run from the public CVS - though you are also, of course, going to get every latest bug as well :^) Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] E-Commerce solution using Python and Zope.
Hi All, do you know about something written in Python Zope for e-commerce solutions? Thanks. Jilani -- jk ___ http://space.tin.it/scuola/jkhaldi FreeBSD ~ The Power To Serve ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] M$soft
Hello, Is anybody bold enough to try Zope with ODBC to an ACCESS database? How about a Micosoft's SQL? Have you had any success with either? What would you recommend?? Regards, Luis. -- == Luis Cortes Pollak EPD (915) 621-6113 == ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Site search
I followed the helpful instructions in the Z Catalog tutorial concerning adding searching to my site, and it works, though not in the way that I'd like. I've added the raw field to the list of searched indices, and chosen to only index DTML documents. Yet, all of my searches seem to be case sensitive, and they all seem to be 'and' searches. I'm not particularly interested in supporting boolean keywords, but since my site isn't that large, it might make more sense to treat searches as 'or' searches by default. How difficult is it to implement case insensitive searches in this manner? Also, I've noticed that DTML documents don't appear to automatically add themselves to the Z catalog. My understanding is that all Z catalog-aware classes automatically notify the catalog when they are created; are DTML documents and methods not catalog-aware? Thanks. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] ZOPE ITALIAN Mailing List
Sorry for bothering you. This is a one-time spam. A dozen people are being mailed in the back (blind carbon copy :-) I'd like to know if there's a need for an italian Zope list. Altough I'm OK reading or writing english, such a list could free some CPU cicles from my brain that I can devote to the Zen Of Zope or helping newbies. If somebody is interested, or can host the list, please reply privately. Thank you. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] M$soft
Is anybody bold enough to try Zope with ODBC to an ACCESS database? I wrote a Jet database adapter so you can skip the ODBC and go straight to access. http://www.zope.org/Members/jfarr/Products/ZJetDA/ SQL server is a different story. --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998 ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Subclassing from Custom Python Classes
Thank you for the useful information!! I do have one more question regarding your persistence comments. How does using a temporary name notify the Zope persistence machinery that self.map has changed? Doesn't 'self.map=m' do nothing in Python if one already did a 'm=self.map'? In the end, aren't they referencing the exact same object? Hows does Zope know its different? Thanks again, Pete On Wed, May 24, 2000 at 12:38:03AM -0400, Chris McDonough wrote: You should also note that your subclass must obey the ZODB persistence rules, which basically state that mutable sub-objects should be treated immutably. For example, self.bird='parrot' # OK self.map['bird']='parrot' # NOT OK, will not trigger persistence machinery m=self.map m['bird']='parrot' self.map=m # OK, treats a mutable object immutably What are these "persistence rules" and how come the second example is ok? I thought in Python, when you assign "m = self.map" that m is simply pointing to the same object as self.map and that any changes to m affect self.map too? Does the "self.map = m" have any effect? Don't they point to the same object? It's a long story. :-) Attributes of Zope objects need to play by some ground rules to be persistent. The description in the docs is sort of a half truth. It works as described, but you can also do something like: self.map['bird'] = 'parrot' self._p_changed = 1 to trigger the persistence machinery. The "m=self.map..." stuff in the example does the same thing. In either case you're bringing it to Zope's attention that it needs to at some point re-write the object referred to by "self" out to the ZODB. By doing the jiggery up there where you use "m" as a temp object, operate on it, and then reassign "self.map" to "m" in order to let Zope know you've really changed the object and that you really want to write a new copy of it out to the ZODB when it's convenient for it to do so. the _p_changed flag applies to any Zope object, and just needs to be set true at some point during the method to let the persistence machinery know that the object has changed state. In english the phrase "mutable sub-objects should be treated immutably" means that attributes of the Zope object you're mucking with that can be reassigned "in-place" (things you can append to like a list, or add items to like a dictionary) should be treated as though they can't be. So when saying (where 'self' is a Zope object): self.mylist.append("foo") This should be given special treatment, either by saying: self.mylist.append("foo") self._p_changed = 1 or mytmp = self.mylist mytmp.append("foo") self.mylist = mytmp I ask because I've already built my first product based on a custom python class I wrote (its a router object that has methods to query various snmp oids) based on a ZClass and I want to make sure that I am not doing anything wrong. In addition to the methods that query the oids, I store the results in an instance variable of my Python class so I can cache the information for a specified amount of time. Is this safe to do? Can I store these values in my Python instance (self.), not a ZClass property? Sure, just make sure you abide by the stuff above. Also, What happens if multiple people activate my query method, do I need to worry about them stomping over each other as the method writes the results to the instance variables? Is there any record locking of objects? The ZODB will flag a ConflictError and will cause the second attempter to retry. This is pretty normal, and your data won't get munged. Look out, however, if you're really concerned, about "hot spots" that can effect performance. Lastly, since I couldn't really find any pointers regarding a builtin Zope scheduler that is bug free, I need to write a small python script that I can place in a cron job to run every ten minutes to call the query methods of these objects so they update their cache instances. Is there a link on how to get a regular Python script access to the ZODB? Yes... sort of. Try looking for a HowTo named "The Debugger is Your Friend" by Michel Pelletier. That shows you how to use the Zope module from inside python. It's simpler than you might expect. Here's an example (make sure you shut down your Zope before you try this or it won't work): [chrism@opar chrism]$ cd Zope2.1.6/lib/python [chrism@opar chrism]$ python import Zope app = Zope.app() app Application instance at 8455220 dir(app) ['Control_Panel', '__allow_groups__'] Play around inside Python, call methods on things, etc. This is a great way to learn more about Zope. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists -
Re: [Zope] The agony of the ZOPE Documentation
[EMAIL PROTECTED] wrote: I'm sorry, but I have to say, the ZOPE documentation, despite efforts to improve it, is absolutely, positively horrible. Not because the content isn't there, but because the tools to access it simply suck. I can type in searches on both zope.org and zdp.zope.org and though I KNOW the information is there, I can't get the results I want! Ok. This only vaguely begins to address your issues, but I went ahead and added searching Zope.org with Google to the "search" page- the one you get for clicking on the "search" link at the top of the page. For example, I searched for dtml-+in (had to add the +, because "in" is a stop-word) and got loads of relevant results. Hope this helps a tiny bit. Digital Creations did just recently hire me, in part, to fix the tools to access the documentation, so you can expect it to get better soon. Thanks, ethan mindlace fremen Zopista Community Liason ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )