[Zope] product organization

2005-07-27 Thread Nicholas Wieland
As usual, my question is rather simple :) I'd like to know what are the best practices for product organization - for example I have _tons_ of queries to sqlserver, and my main class is becoming less manageble every time I look at it :/ I like the way SQL integrates in Zope, what I don't like is ha

Re: [Zope] product organization

2005-07-27 Thread Marco Bizzarri
Nicholas Wieland wrote: > As usual, my question is rather simple :) > I'd like to know what are the best practices for product organization - > for example I have _tons_ of queries to sqlserver, and my main class is > becoming less manageble every time I look at it :/ > I like the way SQL integrate

[Zope] unwise.exe missing on linux

2005-07-27 Thread michael nt milne
Hi Does anyone know if the zope uninstall program 'unwise.exe' can be got separately? I have installed zope on linux but the unwise.exe program isn't within the package. Thanks Michael ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/li

[Zope] ZPsycopg - Losing Connections

2005-07-27 Thread David
Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 - Solaris 8 (Intel) Hi I am experiencing a new problem, that was not present in the past on the above server. From the Zope error log: Exception Type OperationalError Exception ValuePQsendQuery() -- There is no connecti

Re: [Zope] unwise.exe missing on linux

2005-07-27 Thread Lennart Regebro
On 7/27/05, michael nt milne <[EMAIL PROTECTED]> wrote: > Does anyone know if the zope uninstall program 'unwise.exe' can be got > separately? I have installed zope on linux but the unwise.exe program > isn't within the package. That's because unwise.exe is only needed if you used wise to install

Re: [Zope] product organization

2005-07-27 Thread Nicholas Wieland
Well, not exactly - just a way to separate access to data from everything else in the product. Maybe a separate class that needs the connection as argument and that just returns the data I need in appropriate data structures by calling class methods.   class DataModel (object):     def __init__ (s

[Zope] Re: Running more than one instance on windows often block each other

2005-07-27 Thread Sune B. Woeller
I will try to recreate the problem on other flavours of windows asap. I will get back to you later. I guess my reporting was a bit too quick, sorry: I'm running python 2.3.5, (installed from windows binary). Zope 2.7.7 (not necessary for the test scripts) Windows XP Home SP2 (blush - my laptop ca

[Zope] Re: Running more than one instance on windows often block each other

2005-07-27 Thread Sune B. Woeller
I will try to recreate the problem on other flavours of windows asap. I will get back to you later. I guess my reporting was a bit too quick, sorry: I'm running python 2.3.5, (installed from windows binary). Zope 2.7.7 (not necessary for the test scripts) Windows XP Home SP2 (blush - my laptop ca

Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Fernando Lujan
On 7/27/05, David <[EMAIL PROTECTED]> wrote: > Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 - > Solaris 8 (Intel) The Psycopg version 1.1.19 solves this problem. :) -- Fernando Lujan ___ Zope maillist - Zope@zope.org http://mail.zop

Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Peter Bengtsson
On 7/27/05, Fernando Lujan <[EMAIL PROTECTED]> wrote: > On 7/27/05, David <[EMAIL PROTECTED]> wrote: > > Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 - > > Solaris 8 (Intel) > > > The Psycopg version 1.1.19 solves this problem. :) > The 1.1.19 version isn't in debian yet. $ apt-

Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Fernando Lujan
On 7/27/05, Peter Bengtsson <[EMAIL PROTECTED]> wrote: > On 7/27/05, Fernando Lujan <[EMAIL PROTECTED]> wrote: > > On 7/27/05, David <[EMAIL PROTECTED]> wrote: > > > Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 - > > > Solaris 8 (Intel) > > The Psycopg version 1.1.19 solves this pr

[Zope] reportlab and images

2005-07-27 Thread Nicholas Wieland
I know, I'm flooding the list ... I use images inside my reports, so I have to open PIL-image objects inside my product. Everything is fine, but I must use the full path, like /Zope-Instance/Products/foobar/image/blah.png, and this is a problem, because the product will have a different path when p

Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Thomas Olsen
On Wednesday den 27. July 2005 14:45, Peter Bengtsson wrote: > On 7/27/05, Fernando Lujan <[EMAIL PROTECTED]> wrote: > > On 7/27/05, David <[EMAIL PROTECTED]> wrote: > > > Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 - > > > Solaris 8 (Intel) > > > > The Psycopg version 1.1.19 solv

Re: [Zope] Re: Running more than one instance on windows often block each other

2005-07-27 Thread Tim Peters
[Sune B. Woeller] > I will try to recreate the problem on other > flavours of windows asap. I will get back to you > later. Cool! If you can, posting a self-contained program that demonstrates the problem is the best way to make progress. > I guess my reporting was a bit too quick, sorry: Not a

[Zope] find a file's type

2005-07-27 Thread Allen Huang
is there any dtml codes that can display a file's type?   I made a site that allows a person to send up a document file. But in the end what I really wanted is to let people to upload .doc files. Since I didn't put any restriction on it, people always send up a smaller .pdf file instead.   So how

Re: [Zope] find a file's type

2005-07-27 Thread Peter Bengtsson
All File objects have a content_type property. Try On 7/27/05, Allen Huang <[EMAIL PROTECTED]> wrote: > is there any dtml codes that can display a file's type? > > I made a site that allows a person to send up a document file. But in the > end what I really wanted is to let people to upload

[Zope] use combined propertysheet variables to form a file name for a zObject

2005-07-27 Thread Allen Huang
I made a propertysheet for a customed zclass and I wish to use some variables and combine them to form a name for my newed created object.   Say I have variable a = 'name a' b = 'value b' c = 'string c'   what do I encode in my dtml method some_add        ?? into the combination of a, b, and

Re: [Zope] use combined propertysheet variables to form a file name fora zObject

2005-07-27 Thread Jonathan
Here's a code snippet from one of our applications (you should be able to figure out what you need from this example):                       UserData is a folder where new zclass instances are stored. TCAUsers is our zclass TCAUsersPS is the common instanc

Re: [Zope] product organization

2005-07-27 Thread J Cameron Cooper
Nicholas Wieland wrote: As usual, my question is rather simple :) I'd like to know what are the best practices for product organization - for example I have _tons_ of queries to sqlserver, and my main class is becoming less manageble every time I look at it :/ I like the way SQL integrates in

[Zope] what the namespace means in Script(python)?

2005-07-27 Thread Litao Wei
Hi list: In Script(python) binding page. there is some description about namespace binding: When the script is called from DTML, this is the caller's DTML namespace, otherwise it is an empty namespace. Recommended value: |_| (underscore character) But in zope book, when talk about Error H

Re: [Zope] reportlab and images

2005-07-27 Thread Dieter Maurer
Nicholas Wieland wrote at 2005-7-27 15:47 +0200: >I use images inside my reports, so I have to open PIL-image objects inside my >product. >Everything is fine, but I must use the full path, like >/Zope-Instance/Products/foobar/image/blah.png, and this is a problem, because >the product will have

Re: [Zope] product organization

2005-07-27 Thread Dieter Maurer
Nicholas Wieland wrote at 2005-7-27 13:54 +0200: >Well, not exactly - just a way to separate access to data from everything else >in the product. >Maybe a separate class that needs the connection as argument and that just >returns the data I need in appropriate data structures by calling class >

[Zope] ZSQLMethod conditional insert

2005-07-27 Thread Thomas Olsen
Hi This is probably an FAQ but I haven't been able to find and answer. I need a counter for a certain CMFType and want to store the hits in a MySQL database not to fill up the ZODB. I've checked to two suggestions below but they both use two ZSQLMethods first to check if the URL is already in t

Re: [Zope] Running more than one instance on windows often block each other

2005-07-27 Thread Tim Peters
[Tim Peters] ... > Ran that loop in two processes. No hangs, or any > other oddities, for some minutes. It did _eventually_ hang-- and both > processes at the same time --with netstat showing more than 4000 > sockets hanging around in TIME_WAIT state then. I assume I bashed > into some int

[Zope] Plone doesn't show up in the Zope Interface - ./runzope issue

2005-07-27 Thread michael nt milne
Hello This is my first experience of unix installs from source and I need a small amount of help to finish off my installation. I've installed Zope and Python from source, remotely, onto a RedHat box and am able to access the browser based ZMI admin screen remotely. I've followed the following in

[Zope] Does Plone need the Zope CMF?

2005-07-27 Thread michael nt milne
Hi This isn't clear to me. I've installed Zope and Python from source but do I need to also install the Zope CMF for Plone to run properly? This isn't mentioned specifically any where if so. It would good to have some of these components wrapped up etc for easier install. I couldn't find the RPM'

Re: [Zope] Does Plone need the Zope CMF?

2005-07-27 Thread Chris McDonough
Yes, it does (heavily). See http://plone.org/documentation/how-to/setup-from-source - C On Wed, 2005-07-27 at 20:57 +0100, michael nt milne wrote: > Hi > > This isn't clear to me. I've installed Zope and Python from source but > do I need to also install the Zope CMF for Plone to run properly

Re: [Zope] Does Plone need the Zope CMF?

2005-07-27 Thread Andreas Jung
--On 27. Juli 2005 20:57:23 +0100 michael nt milne <[EMAIL PROTECTED]> wrote: Hi This isn't clear to me. I've installed Zope and Python from source but do I need to also install the Zope CMF for Plone to run properly? This isn't mentioned specifically any where if so. CMF is mandatory i

Re: [Zope] Plone doesn't show up in the Zope Interface - ./runzope issue

2005-07-27 Thread Andreas Jung
*Please* stop cross-postings. Posting the same question to multiple lists at a time is considered to be rude. If you expect help, stick to this basic *rule*. -aj pgpPafsOadrPJ.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http:

[Zope] Re: Zope Foundation Update

2005-07-27 Thread Christian Scholz
Hi! Andrew Milton wrote: > You took someone else's work and claimed it as your own. This is the worst > crime > you can commit in the Open Source world. > I think it's not really a discussion about Open Source here as it should make no difference to the Zope community whether ZC or ZEA is hol

Re: [Zope] ZSQLMethod conditional insert

2005-07-27 Thread David Pratt
Hi Thomas. I would say postgres is better for this sort of thing. In postgres, you can write a function in plpgsql or other function language (there is also a python function language) that you install in postgres. In any case once you write it and then call it - it is executed in a single tra

Re: [Zope] ZSQLMethod conditional insert

2005-07-27 Thread Thomas Olsen
Hi David On Wednesday den 27. July 2005 23:50, David Pratt wrote: > Hi Thomas. I would say postgres is better for this sort of thing. In > postgres, you can write a function in plpgsql or other function > language (there is also a python function language) that you install in > postgres. In any c

[Zope] Re: ZSQLMethod conditional insert

2005-07-27 Thread Christian Scholz
Hi! Might something like this help? INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1; So this will catch errors and instead do the update. Available from version 4.1.0 on as the docs say. See also the docs: http://dev.mysql.com/doc/mysql/en/insert.html -- christia

Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Felipe Barousse Boue
Fernando: I have downloaded the source from http://initd.org/pub/software/psycopg/PSYCOPG-1-1/ and compiled it (in RH FC4 and RHEL3, tough) with no problams whatsoever. I am using Zope 2.7.5, Python 2.3.5, Psycopg sources 1.1.19 and PostgreSQL 8.0.3 The only advice would be to u

Re: [Zope] Re: ZSQLMethod conditional insert

2005-07-27 Thread Thomas Olsen
On Thursday den 28. July 2005 00:23, Christian Scholz wrote: > INSERT INTO table (a,b,c) VALUES (1,2,3) >        ON DUPLICATE KEY UPDATE c=c+1; Thanks - that was exactly what I needed -- Med venlig hilsen Thomas Olsen http://www.headnet.dk ___ Zope ma

[Zope] Re: Zope 2.8 Installation trouble on XP

2005-07-27 Thread Chris Beaven
Just to chirp in, I just tried to install 2.8 on my dev box and I am receiving the same error (XP SP2) Previous versions of Zope that have been (and still are) installed: 2.7.3, 2.7.5, 2.7.6 ___ Zope maillist - Zope@zope.org http://mail.zope.org/m

Re: [Zope] Re: Zope 2.8 Installation trouble on XP

2005-07-27 Thread Andreas Jung
--On 28. Juli 2005 13:59:54 +1200 Chris Beaven <[EMAIL PROTECTED]> wrote: Just to chirp in, I just tried to install 2.8 on my dev box and I am receiving the same error (XP SP2) Could you please tell us *which error*? The people in charge for fixing such issues need some more useful infor

[Zope] Zope 2.8.1 beta 1 released

2005-07-27 Thread Andreas Jung
Hi all, on behalf of Zope Corporation and the Zope community I am pleased to announce the release of Zope 2.8.1b1. You can download Zope 2.8.1b1 from http://www.zope.org/Products/Zope/2.8.1b1/ Some new features of Zope 2.8: - ZODB 3.4 with MVCC (multi version concurrency control) su

Re: [Zope] Running more than one instance on windows often block each other

2005-07-27 Thread Tim Peters
It's starting to look a lot like the Windows bind() implementation is unreliable, sometimes (but rarely -- hard to provoke) allowing two sockets to bind to the same (address, port) pair simultaneously, instead of raising 'Address already in use' for one of them. Disaster ensues. WRT the last vers