[Zope-dev] External method
This is not a strictly zope related question but it is zopeish :) In an external method I need to call an executable and capture the output it generates. This executable however needs to connect to a running X Server. I used the popen2 command but it returns with the obvious error : "theprogram : cannot connect to X Server". So how does one tell a program to attach to a X server? Any help would truly delight me Roché ___ 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] 'Subclassing' another product
I think I read somewhere that it was, from version 2.2 of Zope, possible to 'subclass' products. Is this just somebody janking my chain, or is it actually possible? If it is possible, would someone care to explain? Thanks. -Morten ___ 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] Loginmanager and local roles
[Morten W. Petersen] | Any suggestions? Found the problem. There needs to be a method called user_names in the acl_users folder, which returns all the user ids: """ paramsself/params user_ids = self.UserSource.getPersistentItemIDs() user_ids2 = [] for id in user_ids: user_ids2.append(id) return user_ids2 """ (Can't understand why I had to use an additional list though). Cheers. -Morten ___ 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] SQLAlias Memory Leak?
The leaking SQLAlias I see is coming from: Shared.DC.ZRDB.Results I'm going to try the same type of fix in there and see what happens. -jon "Brian Lloyd" [EMAIL PROTECTED] writes: oops - I sent that before I had my coffee. I should have attached the checkin version, not the broken one :) Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ 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] A groupware package for zope
[Magnus Heino] | I'd appreciate to be able to download some code from zope.org :-) Uhmm. Yeah. http://www.zope.org/Members/morphex/ZopeGUM -- guess you don't know about the /Product and search facilities.. ;) Cheers, Morten ___ 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] regex (or re) modules
Does anybody know why these modules aren't available for DTML and Python Methods? (I already hacked my server, just wanna know what I'm riskin) Thanks, Tim ___ 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] regex (or re) modules
Because both are quite capable of crashing a thread (maybe the whole thing), with poorly written regex expressions. Creating infinate loops is easier than you think, esp if your regex requires backtracking to "solve". Perhaps there should be a simplified regex engine available, that I don't know. Chris -- | Christopher Petrilli | [EMAIL PROTECTED] - Original Message - From: "Tim McLaughlin" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 19, 2000 2:35 PM Subject: [Zope-dev] regex (or re) modules Does anybody know why these modules aren't available for DTML and Python Methods? (I already hacked my server, just wanna know what I'm riskin) ___ 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] Performance enhancements, ZCatalog
ZCatalog enthusiasts, I just upgraded our zope installation from 2.1.6 to 2.2.4, and the ZCatalog performance is aweful. Can someone remind me what the command for speeding up python on a dual processor machine is? python -T? I'm looking for any way to speed this up. I have a text index with 47,000 objects and a search takes about 15-18 seconds, hardly what we were used to. It used to be 2 second tops. My company is being shopped around and if we get bought I want to convince the new company that Zope and python and Linux are the way to go. I need all the help I can get. All my best, Jason Spisak CIO __ ___ ____ / // (_)_/_ __/__ / / ___ ___ __ _ / _ / / __/ -_) / / -_) __/ _ \(_-_/ __/ _ \/ ' \ /_//_/_/_/ \__/_/ \__/\__/_//_/___(_)__/\___/_/_/_/ 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats. ___ 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] Preliminary test of Membership on CVS
Michael Bernstein wrote: Bill Anderson wrote: On a related note, I am considering changing the python methods to Python Scripts, this way when 2.3 comes out, it drops the number of additional installs required by one, leaving Loginmanager and ZPatterns the only (current) requirements. Python Scripts eem much better to use than Python Methods anyway ;) Any thoughts on that from the community? Bill, The move to Python Scripts sounds like a good one. Thanks, I think it is agood one. I wonder if Python Scripts will be officially 'supported', or at least an install documented for 2.2.x? Relying on Python Scripts makes it 2.3 dependant, otherwise. BTW, Can you fold in my local roles changes, and create an Could you resend that to me? additional Type of User Source for use with SMB? I'll contribute the code that I've got. Probably won't do another Usersource for the nearing-release 1.0 version, but if you have one, I may put it in 1.x, and can provide it as a file to DL from the site. I'm working right now on policy objects, zopehelp Documantation, and code cleanup. I was going to do PTK Integration, but don't have the time to recreate the work others didn't share. ;) ___ 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] [Zope-dev] [BUG] Background processes interfere with Zope's HTTP responses
Today was again a hard Zope day. Did you ever hear, that usually (i.e. if you do not do special things) Zope renders a complete page before it starts sending the result back to the client. This implies that you should never see only half of a page. I heard it and I saw the code that does it. Therefore, I was convinced that this were really the case. Then our client phoned: He visits a page that allows him to generate a newsletter. When he presses the "generate newsletter button", a result page is build that tells him that the newsletter is being generated and send is a few minutes. He reported, that this response page is build only half, then stops, to be completed only half a minute later, at the same time when the newsletter arrives. The effect is reproducible. If newsletter generation takes longer, he must wait longer for the page to complete. He is convinced that we generate the newsletter synchronously and let him wait until the generation is complete. And he is angry. I know, that the newsletter is generated in a background process, started in an external method with: os.system("gen_newsletter ") I try to reproduce the behaviour in our test environment and fail. I do not have to wait, until the newsletter generation finished. Then, I use the official service URL and see, I observe the same behaviour. The difference: in the test environment, the browser connects directly to ZServer; with the official URL, it connects via a proxy. Puzzling! What happened? The background process inherits Zope's open file descriptors. Among them are all currently open HTTP request sockets. The process keeps these sockets open until it finishes. There are two HTTP modes: 1. single request mode a new TCP connection is created for each HTTP request, the request is completed, when the TCP connection is closed. 2. multi request mode several requests share a single TCP connection. The "Content-Length" HTTP header allows client and server to determine the request boundaries. That means: when a client uses the multi request mode, everything is fine. Clients, however, that use the single request mode wait until their connection is closed and can observe serious delays. These delays may be very difficult to explain, as the background process not only delays its own request but may delay arbitrary other requests that happen to be served at the same time. How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter ___ 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 ) From [EMAIL PROTECTED] Tue Dec 19 20:13:04 2000 Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Received: (qmail 19892 invoked from network); 19 Dec 2000 20:13:04 - Received: from unknown (HELO dark.darkweb.com) (unknown) by unknown with SMTP; 19 Dec 2000 20:13:04 - Received: (from garthh@localhost) by dark.darkweb.com (8.9.3/8.9.3) id MAA21887 for [EMAIL PROTECTED]; Tue, 19 Dec 2000 12:09:49 -0800 Date: Tue, 19 Dec 2000 12:09:49 -0800 From: Garth Hitchens [EMAIL PROTECTED] Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: testing From [EMAIL PROTECTED] Tue Dec 19 20:15:10 2000 Return-Path: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] Received: (qmail 19940 invoked from network); 19 Dec 2000 20:15:04 - Received: from unknown (HELO contesting.com) (unknown) by unknown with SMTP; 19 Dec 2000 20:15:04 - Received: from notebook ([216.1.129.5]) by contesting.com (8.11.0/8.11.0) with SMTP id eBJJOl911660; Tue, 19 Dec 2000 14:24:52 -0500 (EST) From: "Bill Fisher" [EMAIL PROTECTED] To: "Garth Hitchens" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], "Randy Thompson" [EMAIL PROTECTED] Subject: PR Progress as of today Date: Tue, 19 Dec 2000 14:23:05 -0500 Message-ID: [EMAIL PROTECTED] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_NextPart_000_00FB_01C069C7.33BDF7B0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal This is a multi-part message in MIME
[Zope-dev] POST METHOD
Is there a data limit if I am using the POST method ?I have been doing a form that has some input fields, when I do the post I receive a Zope Error The Zope don´t get one form field, but this one exists). Thanks so much !!! anderson ___ 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: [Zope] [BUG] Background processes interfere with Zope's HTTP responses
He reported, that this response page is build only half, then stops, to be completed only half a minute later, Depending on how long the page is I never see the bottom. When I use the products page I have to refresh 2-3 times to see the bottom part. This is thru a proxy only. I try to reproduce the behaviour in our test environment and fail. I do not have to wait, until the newsletter generation finished. Then, I use the official service URL and see, I observe the same behaviour. The difference: in the test environment, the browser connects directly to ZServer; with the official URL, it connects via a proxy. Puzzling! I'm having this same sort of problem w/Zope 2.3a1. I just started trying to use Zope through a proxy. If I work directly on the machine I have no problems. How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter I'm on the win32 platform and thought that the problem was with my proxy software. Now I'm not so sure. -Jimbo ___ 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: [Zope] [BUG] Background processes interfere with Zope's HTTP responses
How to fix the problem: There should be a (file) control "CloseOnExec", that tells Unix to automatically close the file like object upon an exec. ZServer should probably use it on each of its sockets. I can not see a serious application that should have direct access to ZServer's HTTP request socket. I will soon file a bug report into the Collector. Dieter I'm on the win32 platform and thought that the problem was with my proxy software. Now I'm not so sure. Note that what Dieter is talking about would only affect you if you were spawning an external process that inherited the filehandles of the zope process. Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ 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] A groupware package for zope
For the last couple of months I've been working on a groupware package for Zope, named ZopeGUM. It has reached version 0.1.63 now, and it's in steady progress. All the planned components, like messenger, address book, calendar, todos, etc. are there and working now; though it's definently not ready for a production enviroment yet. Anyways, just wanted to let you all know. (And yes, I do appreciate feedback. =) -Morten ___ 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: [Zope] POST METHOD
On Tue, Dec 19, 2000 at 06:44:35PM -0200, Anderson Ami wrote: Is there a data limit if I am using the POST method ?I have been doing a form that has some input fields, when I do the post I receive a Zope Error The Zope don´t get one form field, but this one exists). Some older browsers have a limit to the amount of data they send in a request, usually around 64k. On the other hand, you may want to examine what is actually in the REQUEST object. You can view the contents by including the REQUEST object in your page: dtml-var REQUEST -- Martijn Pieters | Software Engineer mailto:[EMAIL PROTECTED] | Digital Creations http://www.digicool.com/ | Creators of Zope 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] 'Subclassing' another product
Hi Morten, There are two ways to subclass products. You can use straightforward Python subclassing: e.g.,In your custom Product.. here is an example from Zwiff: import Products.PythonMethod.Guarded from Globals import HTMLFile, MessageDialog from App import Common manage_addZwiffForm = HTMLFile('addForm',globals()) def manage_addZwiff(self, id, title, params, body, REQUEST=None): """Add A Zwiff to a folder just like PythonMethod.. """ it = Zwiff(id, title, params, body) self._setObject(id, it) return self.manage_main(self, REQUEST) def handleMovieOutput(movie, RESPONSE): fname = tempfile.mktemp() movie.save(fname) f = open(fname) s = f.read() f.close() RESPONSE.setHeader('Content-type', 'application/x-shockwave-flash') os.remove(fname) return s class Zwiff (Products.PythonMethod.PythonMethod.PythonMethod ): meta_type = 'Zwiff' def makeFunction(self, compile=0): from Products.PythonMethod.Guarded import GuardedBlock, safefuncs, theGuard if compile: self._checkCBlock(GuardedBlock) if self.errors: raise "Python Method Error", string.join(self.errors, '\n') return self._newfun(compile, {'$guard': theGuard}, __builtins__=mysafebin, _=safefuncs) So the class Zwiff is a subclass of PythonMethod. Look at Zwiff for the full source: http://www.zope.org/Members/sspickle/Zwiff Or you can create a ZClass that subclasses from a 'base class'. To do this you've got to register the base class with the ZClass machinery (e.g., here is the code for ZCVSMixin that does this ZCVSMixin is a base class... CVSFolder is a full blown product that happens to be a subclass of ZCVSMixin... ) import ZCVSMixin import CVSFolder __doc__ = ZCVSMixin.__doc__ __version__ = ZCVSMixin.__version__ def initialize(context): context.registerClass( CVSFolder.CVSFolder, constructors=(CVSFolder.manage_addCVSFolderForm, CVSFolder.manage_addCVSFolder), icon='fish.gif', ) context.registerBaseClass(ZCVSMixin.ZCVSMixin) does that help? take care, -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 )