[Zope-Annce] Nuxeo releases CPSGroupware 1.9

2006-03-21 Thread Lennart Regebro
March 20, 2006 -- Nuxeo is pround to release CPSGroupware 1.9

CPSGroupware is a bundle of the CPSMailAccess webmail client and the
CPSSharedCalendar web calendar. It adds powerful groupware feature to
the CPS Platform, hence tightly integrate ECM and Groupware features.

CPSMailAccess is a full featured open source webmail application for
CPS3. It provides a flexible web interface to browse and send mails,
fully integrated to CPS portals, as it can be used by any allowed
member of the portal. CPSMailAccess goes further in the integration of
the mail with the ECM space: unified search (corporate documents and
mails), support of workflow on mails, etc.

Features of CPSMailAccess include among others:

* AJAX based mail editor,
* drag'n'drop for mails and folders,
* incoming mails filtering,
* private and public address books,
* mail indexing and search,
* etc.

Recent changes includes:

* GenericSetup support for easier install
* Protected folders,
* Improved search,
* and of course bugfixes.

For more functional and technical information, see the CPSMailAccess web site:

* http://www.cps-project.org/sections/projects/cpsmailaccess

CPSSharedCalendar is an advanced, flexible, standard-based calendaring
component for the CPS Platform. It allows CPS users to access
personal, group and resource calendars using a web interface. Events
on the calendar can be shared between multiple users, resourcs and
meetings can be booked.

Features of the CPSSharedCalendar include among others:

* a web interface for managing calendars,
* integration with iCalendar clients (Apple iCal, Mozilla
  Sunbird...) using the iCalendar protocol,
* invitation workflow,
* meeting support,
* meeting helper that looks for free time,
* etc.

CPSSharedCalendar a part of Nuxeos new generation calendar software
suite. It has been written from the ground up to be easy to integrate
with other Zope 2 platforms such as Plone and Silva, and with
portability to Zope 3 in mind. Its Python core component (CalCore) can
even be used outside of Zope altogether.

Recent changes includes:

* Using the tighter integration of Zope 3.2 and Zope 2.9 for greater
  future compatibility,
* GenericSetup support for installation and upgrades,
* And of course, various minor bugfixes.

For more functional and technical information, see the
CPSSharedCalendar web site:
http://www.cps-project.org/sections/projects/calendar_server

You can download CPSGroupware 1.9.0 here:
http://www.cps-project.org/static/misc/CPSGroupware-1.9.0-1.tgz

Look at the README.txt file in the package for more information on how
to install CPSGroupware.

If you'd like to help with CPSGroupware development, please join the
cps-devel mailing list at
http://lists.nuxeo.com/mailman/listinfo/cps-devel (a dedicated list
will be created if needed in the future).

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

  Zope-Announce for Announcements only - no discussions

(Related lists -
 Users: http://mail.zope.org/mailman/listinfo/zope
 Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-Annce] mod_pcgi2 has been declared obsolete

2006-03-21 Thread Oleg Broytmann
Hello!

   Zope lost support for PCGI protocol at version 2.7. Because of this I
stopped maintaining mod_pcgi2. Today I switched my last site that have used
mod_pcgi2 to mod_proxy. Now mod_pcgi2 is declared obsolete. Please use
mod_proxy or mod_fastcgi instead.

Oleg.
-- 
 Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.
___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

  Zope-Announce for Announcements only - no discussions

(Related lists - 
 Users: http://mail.zope.org/mailman/listinfo/zope
 Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-Annce] Zope Debugger 0.8.2 Released!

2006-03-21 Thread Chris Withers

Zope Debugger is an enhanced version of pdb for use with Zope.

This release fixes compatability issues with Zope 2.9 and Python 2.4.

It can be used simply by inserting the following lines in any python
code you'd like to debug, including Script (Python)'s and FSPythonScripts:

from Products.zdb import set_trace
set_trace()

It requires no changes to Zope, CMF or Plone or any funky interaction
with any specific kind of editing software. All you really need to do is
insert the snippet above and make sure your Zope instance is running in
foreground mode.

For more information, please see:
http://www.simplistix.co.uk/software/zope/zdb

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk








___
Zope-Announce maillist  -  Zope-Announce@zope.org
http://mail.zope.org/mailman/listinfo/zope-announce

 Zope-Announce for Announcements only - no discussions

(Related lists - 
Users: http://mail.zope.org/mailman/listinfo/zope

Developers: http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope-dev] TCP CLOSE_WAIT leaks

2006-03-21 Thread Alan Milligan
Hi,

I've been noticing a situation for some time that my 2.8.5 Z2 is running
out of threads.  When doing an lsof on it, I see a large number of TCP
handles in CLOSE_WAIT state.

It seems something's not properly clearing down the connection to
release the thread.

Unfortunately, these connections were almost guaranteed to have been set
up via Apache redirect processing, and it's quite successfully cleaned
up its end ...

Does anyone have any idea how this situation might occur, and why Zope's
not properly housekeeping these (maybe Medusa needs a timeout set on
close waits??)

Alan
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [ZWeb] Version 3

2006-03-21 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 21 Mar 2006, at 07:48, Chris Withers wrote:
Yeah, I'm well aware of that. But release space for software and  
addition of news is about all zope.org is currently used for. I  
think this is an important use case to cater for in the future...


*bzz* DENIED

This might be an important use case, but it is out of the scope for  
the new zope.org setup. The new setup is specifically targeted at not  
being a free-for-all community playground anymore.


One of the reasons why the old site is getting worse every day is  
loads of outdated and sometimes plain bad documents and products that  
no one cares for anymore.


jens

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEH9FCRAx5nvEhZLIRApA5AKCSFehWlO6R06TeV63E8Q+0Wpfa6ACeMRdW
pM+r+g1yxOoWrW4u+UNfnoI=
=PerW
-END PGP SIGNATURE-
___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


Re: [ZWeb] Version 3

2006-03-21 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 21 Mar 2006, at 10:13, Chris Withers wrote:


Jens Vagelpohl wrote:
This might be an important use case, but it is out of the scope  
for the new zope.org setup. The new setup is specifically targeted  
at not being a free-for-all community playground anymore.
One of the reasons why the old site is getting worse every day is  
loads of outdated and sometimes plain bad documents and products  
that no one cares for anymore.


So how are people supposed to publish news items?

Where are they supposed to release software?

How are people coming to Zope supposed to find products they want  
to use?


Don't get me wrong, I'm all for limiting scope a lot, but if we're  
not catering for these basic needs, then what's the point of having  
the site at all?


Instead of re-hashing stuff for the umpteenth time, please check in  
the list archives. These discussions were held several times now.


jens

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEH9IURAx5nvEhZLIRAu6zAJ9wwxx3gYvrgi4RfVAf+FR2fIi7HwCfQFtC
iGfPb5F8h2+1ISQiMpqLBV8=
=gc2I
-END PGP SIGNATURE-
___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


Re: [ZWeb] Version 3

2006-03-21 Thread Lennart Regebro
On 3/21/06, Jens Vagelpohl [EMAIL PROTECTED] wrote:
 Instead of re-hashing stuff for the umpteenth time, please check in
 the list archives. These discussions were held several times now.

Dont discuss it. Just link to the conclusion. ;-)

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


Re: [ZWeb] Version 3

2006-03-21 Thread Martijn Faassen

Tom Von Lahndorff wrote:


http://www.modscape.com/zope/v3

Updated. Pretty much ready to roll. Please send along any comments.


Wow, great work! Looks nice. I agree with Brad Allen's comments about 
Zope needing to project a bit of seriousness, and this is serious with 
still enough color.


I'm a text-oriented guy so I'm really am waiting for the catchy text in 
the middle. I hope we can get this integrated for another mockup, also 
concerning subpages.


Regards,

Martijn
___
Zope-web maillist  -  Zope-web@zope.org
http://mail.zope.org/mailman/listinfo/zope-web


[Zope] Archetype and object_tabs

2006-03-21 Thread cristina clavijo

Hi!
I have created a new archetype, I have installed it and it works good. The 
problem is that the object_tabs(translate option, change status option and 
add new item option) don't appear for this new content type and I don't know 
where is the place to specify them.

Thanks for your attention.
Cris.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Archetype and object_tabs

2006-03-21 Thread Jens Vagelpohl

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 21 Mar 2006, at 09:39, cristina clavijo wrote:


Hi!
I have created a new archetype, I have installed it and it works  
good. The problem is that the object_tabs(translate option, change  
status option and add new item option) don't appear for this new  
content type and I don't know where is the place to specify them.

Thanks for your attention.


Please consult a Plone-related mailing list for Archetypes/Plone  
questions: http://lists.plone.org/


jens

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEH9HWRAx5nvEhZLIRAqqtAJ4gkcNeguumouiNiRIgYYkFLgwD2ACePTmL
p44/RssygbE3DHpXa9u4pwI=
=AUIV
-END PGP SIGNATURE-
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] best practice, CSS Stylesheets

2006-03-21 Thread Peter Bengtsson



John Huttley wrote:

Hi,
What is the best way of handling CSS?
I've looked at ZStylesheets, but it is buggy and uses depreciated 
functions that will not be available in 2.10.



I recommend a DTML Document as an upgrade to File objects.
If you use DTML you can
a) easily set some custom cache headers in the css
b) refer to images by a dynamic URL to the imagefolder. *

* example:
#body { background:#fff url(dtml-var images url/bg.png); }



All advice welcome,
--John


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] best practice, CSS Stylesheets

2006-03-21 Thread Tino Wildenhain

Peter Bengtsson schrieb:



John Huttley wrote:


Hi,
What is the best way of handling CSS?
I've looked at ZStylesheets, but it is buggy and uses depreciated 
functions that will not be available in 2.10.



I recommend a DTML Document as an upgrade to File objects.
If you use DTML you can
a) easily set some custom cache headers in the css


Or use a cache manager :-)


b) refer to images by a dynamic URL to the imagefolder. *

* example:
#body { background:#fff url(dtml-var images url/bg.png); }


Which runs against (a) because if you aggressive cache
(which is a good idea) you shouldn't have dynamic elements
in it.

I believe file objects are good enough and you could
probably split the CSS across some files to get the
dynamics w/o loosing performance.

++Tino
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: Strange errors while 'make'ing

2006-03-21 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris McDonough wrote:
 These are warnings coming from GCC (as opposed to errors, which would 
 prevent compilation from finishing).
 
 GCC 4.X emits these pointer signedness warnings whereas earlier GCC 
 versions did not.  This issue has been fixed on the Zope trunk, I 
 believe (the codebase which will become Zope 2.10).

The fix is actually on the ZODB branches / trunk, but not yet propagated
to the svn:externals in Zope (which are pinned to specific revisions of
their respective ZODB branches).


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEH/nO+gerLs4ltQ4RAlt8AJ9tTmgAyRycVpYDHSoe6TZO7lWsMwCgs6pw
VHINSCU7qpZaYyLb4B///X4=
=k5B7
-END PGP SIGNATURE-

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: best practice, CSS Stylesheets

2006-03-21 Thread Tonico Strasser

Tino Wildenhain schrieb:

Peter Bengtsson schrieb:



John Huttley wrote:


Hi,
What is the best way of handling CSS?
I've looked at ZStylesheets, but it is buggy and uses depreciated 
functions that will not be available in 2.10.



I recommend a DTML Document as an upgrade to File objects.
If you use DTML you can
a) easily set some custom cache headers in the css


Or use a cache manager :-)


b) refer to images by a dynamic URL to the imagefolder. *

* example:
#body { background:#fff url(dtml-var images url/bg.png); }


Which runs against (a) because if you aggressive cache
(which is a good idea) you shouldn't have dynamic elements
in it.

I believe file objects are good enough and you could
probably split the CSS across some files to get the
dynamics w/o loosing performance.


I also use DTML for dynamic stylesheets plus a HTTPCacheManager and a 
set_header script to set the text/css media type (and /* vim: set 
syn=css: */).


Only because I'm lazy to change the paths (mainly for @import) in the 
stylesheets.


Tonico

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Give it a rest + answers. (Re: [Zope] Re: Zope + Apache on Quad Debian machine)

2006-03-21 Thread Dario Lopez-Kästen

Martijn Pieters said the following on 2006-03-16 12:25:

On 3/16/06, Tino Wildenhain [EMAIL PROTECTED] wrote:


Hey... but thank you Jens for spending all that time writing an email
that doesn't help any1 at all...!!!


check google for multiple use of exclamation marks.



Or look up Terry Pratchett quotes on www.lspace.org:


snip

Martinj, Chris and others giving nonsential answers: Don't you guys have 
work to do instead of playing bullies on the newbies?.


To be honest, I find arrogant and pointless answers like yours way more 
annoying than a whole bunch of newbies asking more or less cluess questions.


I see a lot of this newbie bashing increasing; in fact it has been some 
years since the zope list was a good example on how to treat newbies 
politely and point them to the prope answers.


Sure, we all have loads of work and are way too stressed, we don't get 
enough sleep, yada, yada, yada... I fail to see how that is a newbie's 
fault, so no need to take it out on them.


For the benefit of all those that have tiny, tiny memory spans, the 
question of Zope's processes necessity to be CPU-bound is a horse that 
was resolved a couple of years ago (2002). It turns out that it is not a 
Zope problem (Oh, the Horror. He's bringing a non-zope question to the 
list!).


It is pythons fault, if you are grumpy old fart, or it is a feature 
if you are having a good day.


The need for threaded python processes to be CPU bound (yes, Zope is 
threaded, in case you have forgotten) arises from the fact that python 
has the GIL (Global Interpreter Lock).


For background see:

http://www.zope.org/Members/glpb/solaris

and

http://www.zope.org/Members/glpb/solaris/report_ps

As far as I know, the GIL is still there and won't go away any time 
soon. Today, the only change from 2002 is that there is a heck of a lot 
more multi-CPU machines than there were back in 2002.


So, to make a long story short: on linux there is a userspace tools 
called taskset:


http://linuxcommand.org/man_pages/taskset1.html
http://aplawrence.com/Basics/taskset.html

if there is no such command for your particular distro/kernelversion, 
look no further than:


http://directory.fsf.org/all/schedutils.html
http://rlove.org/
http://rlove.org/schedutils/
ftp://ftp.kernel.org/pub/linux/utils/util-linux/

I cannot tell you wich version to use, but I think you get the idea. I 
do believe that some distros allready include taskset in them.


So you have to write a wrapper script around zopectl (you are running a 
newer versionof zope, aren't you?) where you do this.


It has worked like a charm for us since 2002 (well, almost - since 
schedutils were new and cool back in 2002 we had regular fights with the 
sysadmins guys regarding the need to introduce 
non-redhat-aproved-kernel-hacks into the production systems. Nowadays 
taskset and related tools are included in the later RHE releases).


Regarding all other advises you have gotten so far (get more memory, 
look at your disks, get a life, etc), I am sure that they have merits, 
but as far as I can see, they don't actually solve anything at all.


The fact that the issue of the GIL is not more prominent in the Zope 
worlds, I think is because relatively few zopistas are aware that there 
is a problem; mostly, because not so many run multicpu-boxes in 
production, and also because of attitude, I suppose: since I don't have 
a problem with it, I don't care about it, and I'll inform you so.


/dario - yes... a bit annoyed at all the help some folks give...

--
-- ---
Dario Lopez-Kästen, IT Systems  Services Chalmers University of Tech.
Lyrics applied to programming  application design:
emancipate yourself from mental slavery - redemption song, b. marley

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] best practice, CSS Stylesheets

2006-03-21 Thread Peter Bengtsson



Tino Wildenhain wrote:

Peter Bengtsson schrieb:



John Huttley wrote:


Hi,
What is the best way of handling CSS?
I've looked at ZStylesheets, but it is buggy and uses depreciated 
functions that will not be available in 2.10.



I recommend a DTML Document as an upgrade to File objects.
If you use DTML you can
a) easily set some custom cache headers in the css


Or use a cache manager :-)

true




b) refer to images by a dynamic URL to the imagefolder. *

* example:
#body { background:#fff url(dtml-var images url/bg.png); }


Which runs against (a) because if you aggressive cache
(which is a good idea) you shouldn't have dynamic elements
in it.
You mustn't use any dtml-if or other crap like that because then, as you 
say Tino, you lose the ability cache the css file.




I believe file objects are good enough and you could
probably split the CSS across some files to get the
dynamics w/o loosing performance.

++Tino



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Give it a rest + answers. (Re: [Zope] Re: Zope + Apache on Quad Debian machine)

2006-03-21 Thread Tino Wildenhain

Dario Lopez-Kästen schrieb:
...


The fact that the issue of the GIL is not more prominent in the Zope 
worlds, I think is because relatively few zopistas are aware that there 
is a problem; mostly, because not so many run multicpu-boxes in 
production, and also because of attitude, I suppose: since I don't have 
a problem with it, I don't care about it, and I'll inform you so.


/dario - yes... a bit annoyed at all the help some folks give...


Otoh, I have yet to see the figures showing the CPU afinity
buys you anything in reality. We know the GIL, thats for sure
but I never saw a measureable difference binding a process
to a CPU (which is also highly depending on the OS scheduler)

I can imagine usefull applications of this - and thats for
tiny computing intense applications where you can assume
the CPU afinity keeps the program in the CPU cache.

Zope isnt by far a tiny application compared to the cache size
of actual CPUs.

++Tino

PS: yes and I dont think newbs or anybody should easily get angry
if they dont get the answer they would like to read...





___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Give it a rest + answers. (Re: [Zope] Re: Zope + Apache on Quad Debian machine)

2006-03-21 Thread Dario Lopez-Kästen

Tino Wildenhain said the following on 2006-03-21 14:51:


Otoh, I have yet to see the figures showing the CPU afinity
buys you anything in reality. We know the GIL, thats for sure
but I never saw a measureable difference binding a process
to a CPU (which is also highly depending on the OS scheduler)



for us, it makes all the difference between zope sucks, why do we 
bother with this non-sense, non-standard, butt-slow appserver, and use 
Java or PHP instead and nice, zope based solutions are really nice, 
not only feature wise, but also speedy. And they are clusterable too, neat!


/dario


--
-- ---
Dario Lopez-Kästen, IT Systems  Services Chalmers University of Tech.
Lyrics applied to programming  application design:
emancipate yourself from mental slavery - redemption song, b. marley

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] error in Zope-2.9.1/README.txt

2006-03-21 Thread Joachim Schmitz

hi,

after unpacking the Zope-2.9.1 tarbal I find in README.txt

Installing Zope
---

Follow the instructions in ``doc/INSTALL.txt`` to install Zope.

this must be ``Zope/doc/INSTALL.txt``



--
Mit freundlichen GrüßenJoachim Schmitz
..
AixtraWare eK ..Joachim Schmitz ..www.aixtraware.de ..t: +49-2464-8851
Hüsgenstr. 33a .d-52457 Aldenhoven .f: +49-2464-905163


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] error while importing

2006-03-21 Thread wavemaster2000

I am trying to import a .zexp folder into zope, i get the object is broken
message,
I have the zmysqldb connection there, i thought this was what it needed but
apparently not.
bellow is the traceback

2006-03-21T10:52:49 WARNING ZODB Could not import class 'PloneFolder' from
module 'Products.CMFPlone.PloneFolder'
--
2006-03-21T10:52:49 ERROR Zope.SiteErrorLog
http://140.247.43.178:8080/test/manage_importObject
Traceback (most recent call last):
  File C:\Program Files\Zope-2.9.1\lib\python\ZPublisher\Publish.py, line
114, in publish
request, bind=1)
  File C:\Program Files\Zope-2.9.1\lib\python\ZPublisher\mapply.py, line
88, in mapply
if debug is not None: return debug(object,args,context)
  File C:\Program Files\Zope-2.9.1\lib\python\ZPublisher\Publish.py, line
40, in call_object
result=apply(object,args) # Type scr to step into published object.
  File C:\Program Files\Zope-2.9.1\lib\python\OFS\ObjectManager.py, line
585, in manage_importObject
set_owner=set_owner)
  File C:\Program Files\Zope-2.9.1\lib\python\OFS\ObjectManager.py, line
604, in _importObjectFromFile
if verify: self._verifyObjectPaste(ob, validate_src=0)
  File C:\Program Files\Zope-2.9.1\lib\python\OFS\CopySupport.py, line
527, in _verifyObjectPaste
action = 'manage_main')
--
View this message in context: 
http://www.nabble.com/error-while-importing-t1318120.html#a3514974
Sent from the Zope - General forum at Nabble.com.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Give it a rest + answers. (Re: [Zope] Re: Zope + Apache on Quad Debian machine)

2006-03-21 Thread Jeff Donsbach
On 3/21/06, Dario Lopez-Kästen [EMAIL PROTECTED] wrote:
 Tino Wildenhain said the following on 2006-03-21 14:51:

  Otoh, I have yet to see the figures showing the CPU afinity
  buys you anything in reality. We know the GIL, thats for sure
  but I never saw a measureable difference binding a process
  to a CPU (which is also highly depending on the OS scheduler)
 

 for us, it makes all the difference between zope sucks, why do we
 bother with this non-sense, non-standard, butt-slow appserver, and use
 Java or PHP instead and nice, zope based solutions are really nice,
 not only feature wise, but also speedy. And they are clusterable too, neat!

 /dario


Dario,
Do you have any kind of comparison numbers of using CPU affinity
vs not for your particular case? Also, are you using ZEO or not?  It's
not that I don't believe you when you say it matters a lot for you. I
do believe you. Like Tino, I'm just generally interested in how much
it matters in measurable terms. I can imagine there are a number of
factors determining how much it matters, like Zope app/workload as
well as the underlying hardware architecture (how big of a penalty is
it to synchronize cache pages between CPUs) and the OS CPU scheduler
as Tino mentioned.

Jeff D
p.s. I agree with the rest of your sentiments about newbie bashing.
Unfortunately, it seems to be a popular past time among some of the
l33ts on a bunch of the lists I monitor these days.
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] error while importing

2006-03-21 Thread Paul Winkler
I think you chopped off the bottom of the traceback.

On Tue, Mar 21, 2006 at 08:02:02AM -0800, wavemaster2000 wrote:
 
 I am trying to import a .zexp folder into zope, i get the object is broken
 message,
 I have the zmysqldb connection there, i thought this was what it needed but
 apparently not.
 bellow is the traceback
 
 2006-03-21T10:52:49 WARNING ZODB Could not import class 'PloneFolder' from
 module 'Products.CMFPlone.PloneFolder'
 --
 2006-03-21T10:52:49 ERROR Zope.SiteErrorLog
 http://140.247.43.178:8080/test/manage_importObject
 Traceback (most recent call last):
   File C:\Program Files\Zope-2.9.1\lib\python\ZPublisher\Publish.py, line
 114, in publish
 request, bind=1)
   File C:\Program Files\Zope-2.9.1\lib\python\ZPublisher\mapply.py, line
 88, in mapply
 if debug is not None: return debug(object,args,context)
   File C:\Program Files\Zope-2.9.1\lib\python\ZPublisher\Publish.py, line
 40, in call_object
 result=apply(object,args) # Type scr to step into published object.
   File C:\Program Files\Zope-2.9.1\lib\python\OFS\ObjectManager.py, line
 585, in manage_importObject
 set_owner=set_owner)
   File C:\Program Files\Zope-2.9.1\lib\python\OFS\ObjectManager.py, line
 604, in _importObjectFromFile
 if verify: self._verifyObjectPaste(ob, validate_src=0)
   File C:\Program Files\Zope-2.9.1\lib\python\OFS\CopySupport.py, line
 527, in _verifyObjectPaste
 action = 'manage_main')
 --
 View this message in context: 
 http://www.nabble.com/error-while-importing-t1318120.html#a3514974
 Sent from the Zope - General forum at Nabble.com.
 
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists - 
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] error while importing

2006-03-21 Thread wavemaster2000

the bottom of the traceback was html code, I have added it to the original
post
--
View this message in context: 
http://www.nabble.com/error-while-importing-t1318120.html#a3516745
Sent from the Zope - General forum at Nabble.com.

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] error while importing

2006-03-21 Thread Paul Winkler
On Tue, Mar 21, 2006 at 09:19:48AM -0800, wavemaster2000 wrote:
 
 the bottom of the traceback was html code, I have added it to the original
 post
 --
 View this message in context: 
 http://www.nabble.com/error-while-importing-t1318120.html#a3516745
 Sent from the Zope - General forum at Nabble.com.

Broken suggests that some product could not be loaded,
but unfortunately doesn't tell which one.

Check out the Products section of your control panel
to find out which one(s),
and look at log/event.log to see what the startup problem was.
Or maybe you just don't have the relevant product installed
at all.

Judging by the immediately previous warning, it may be a plone
installation problem? In which case you  might get better responses on
the Plone list.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Update Multiple Records

2006-03-21 Thread April Lekin

Hi,
I have a web page that goes to a database and pulls out a bunch of records 
for display and then I gave each field the ability to modify except the 
primary ID.


The problem I'm having is how do I make each field unique so that I can go 
back to the database and update the record.  I was thinking about putting 
the primary key in the name like:

input type=text name=lname + ID value=
input type=text name=fname + ID value=

but I don't know how to do that with python.

Is there another way to update a bunch of records at once?  


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Update Multiple Records

2006-03-21 Thread Andrew Milton
+---[ April Lekin ]--
| Hi,
| I have a web page that goes to a database and pulls out a bunch of records 
| for display and then I gave each field the ability to modify except the 
| primary ID.
| 
| The problem I'm having is how do I make each field unique so that I can go 
| back to the database and update the record.  I was thinking about putting 
| the primary key in the name like:
| input type=text name=lname + ID value=
| input type=text name=fname + ID value=
| 
| but I don't know how to do that with python.
| 
| Is there another way to update a bunch of records at once?  

input type=text name=item.lname:records value=
input type=text name=item.fname:records value=


You'll get an a REQUEST object called item which is a list of records with
each attribute set inside it.

-- 
Andrew Milton
[EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Update Multiple Records

2006-03-21 Thread David

Andrew Milton wrote:


+---[ April Lekin ]--
| Hi,
| I have a web page that goes to a database and pulls out a bunch of records 
| for display and then I gave each field the ability to modify except the 
| primary ID.
| 
| The problem I'm having is how do I make each field unique so that I can go 
| back to the database and update the record.  I was thinking about putting 
| the primary key in the name like:

| input type=text name=lname + ID value=
| input type=text name=fname + ID value=
| 
| but I don't know how to do that with python.
| 
| Is there another way to update a bunch of records at once?  


input type=text name=item.lname:records value=
input type=text name=item.fname:records value=


You'll get an a REQUEST object called item which is a list of records with
each attribute set inside it.

 


Hey Andrew,

Cool tip. I never took advantage of this stuff:

form action=pyUpdateRecords name=theform method=post
  input type=text name=items.id:records value=023
  input type=text name=items.lname:records value=smith
  input type=text name=items.fname:records value=frank
  input type=text name=items.id:records value=583
 input type=text name=items.lname:records value=gates
  input type=text name=items.fname:records value=bill

When this form is summited it puts the following array of dictionaries 
in the request: 

items[{'fname': 'frank', 'id': '023', 'lname': 'smith'}, {'fname': 
'bill', 'id': '583', 'lname': 'gates'}]


Then the records can be updated like so:

#module pyUpdateRecords

for item in request.get('items',[]).
   context.SQL.upDateMyRecs(id=item['id'],lname=item['lname'] )
# now return a screen
return context.SomeTemplate(context,request)


David




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] error while importing

2006-03-21 Thread Dieter Maurer
wavemaster2000 wrote at 2006-3-21 08:02 -0800:

I am trying to import a .zexp folder into zope, i get the object is broken
message,
I have the zmysqldb connection there, i thought this was what it needed but
apparently not.
bellow is the traceback

2006-03-21T10:52:49 WARNING ZODB Could not import class 'PloneFolder' from
module 'Products.CMFPlone.PloneFolder'

Almost surely, the warning above gives an essential hint:

  Does your imported object references a PloneFolder?

  If so, it cannot be imported. Fix this and then retry
  your import.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] best practice, CSS Stylesheets

2006-03-21 Thread David Pratt
Anyone have any idea whether dynamic css via dtml will remain possible 
as CMF gets more Z3'ish? Or will only possibility be overrides in css 
itself.


Regards,
David

Peter Bengtsson wrote:



Tino Wildenhain wrote:


Peter Bengtsson schrieb:




John Huttley wrote:


Hi,
What is the best way of handling CSS?
I've looked at ZStylesheets, but it is buggy and uses depreciated 
functions that will not be available in 2.10.



I recommend a DTML Document as an upgrade to File objects.
If you use DTML you can
a) easily set some custom cache headers in the css



Or use a cache manager :-)


true




b) refer to images by a dynamic URL to the imagefolder. *

* example:
#body { background:#fff url(dtml-var images url/bg.png); }


Which runs against (a) because if you aggressive cache
(which is a good idea) you shouldn't have dynamic elements
in it.


You mustn't use any dtml-if or other crap like that because then, as you 
say Tino, you lose the ability cache the css file.




I believe file objects are good enough and you could
probably split the CSS across some files to get the
dynamics w/o loosing performance.

++Tino




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Zope Debugger 0.8.2 Released!

2006-03-21 Thread Chris Withers

Zope Debugger is an enhanced version of pdb for use with Zope.

This release fixes compatability issues with Zope 2.9 and Python 2.4.

It can be used simply by inserting the following lines in any python
code you'd like to debug, including Script (Python)'s and FSPythonScripts:

from Products.zdb import set_trace
set_trace()

It requires no changes to Zope, CMF or Plone or any funky interaction
with any specific kind of editing software. All you really need to do is
insert the snippet above and make sure your Zope instance is running in
foreground mode.

For more information, please see:
http://www.simplistix.co.uk/software/zope/zdb

cheers,

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk








___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] best practice, CSS Stylesheets

2006-03-21 Thread Tino Wildenhain
David Pratt schrieb:
 Anyone have any idea whether dynamic css via dtml will remain possible
 as CMF gets more Z3'ish? Or will only possibility be overrides in css
 itself.

What do you expect to change with Z3? Otoh, not using runtime-generated
CSS is usually a better approach anyway.

Regards
Tino
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Strange errors while 'make'ing

2006-03-21 Thread a blob of green gelatin

On Tue, 21 Mar 2006, Chris McDonough wrote:

These are warnings coming from GCC (as opposed to errors, which would prevent 
compilation from finishing).


GCC 4.X emits these pointer signedness warnings whereas earlier GCC versions 
did not.  This issue has been fixed on the Zope trunk, I believe (the 
codebase which will become Zope 2.10).


Thanks for the answer!

I went ahead and continued then with my installation.

after running 'make install' with no problems, I created an instance via 
the /usr/local/bin/zope/bin/mkzopeinstance.py script.  The script ran fine 
with no errors.


Following the INSTALL.txt file in the Zope directory, my next step would 
be to head over to my installed instance and run the zopectl script to get 
things going.


When I ran it, I get the following:

slimemold[62]:/home/jello/zope/bin% ./zopectl start
Traceback (most recent call last):
  File /usr/local/bin/zope/lib/python/Zope2/Startup/zopectl.py, line 
316, in ?

main()
  File /usr/local/bin/zope/lib/python/Zope2/Startup/zopectl.py, line 
274, in main

options.realize(args)
  File /usr/local/bin/zope/lib/python/Zope2/Startup/zopectl.py, line 91, 
in realize

ZDOptions.realize(self, *args, **kw)
  File /usr/local/bin/zope/lib/python/zdaemon/zdoptions.py, line 273, in 
realize

self.load_schema()
  File /usr/local/bin/zope/lib/python/zdaemon/zdoptions.py, line 321, in 
load_schema

self.schema = ZConfig.loadSchema(self.schemafile)
  File /usr/local/bin/zope/lib/python/ZConfig/loader.py, line 31, in 
loadSchema

return SchemaLoader().loadURL(url)
  File /usr/local/bin/zope/lib/python/ZConfig/loader.py, line 65, in 
loadURL

return self.loadResource(r)
  File /usr/local/bin/zope/lib/python/ZConfig/loader.py, line 159, in 
loadResource

schema = ZConfig.schema.parseResource(resource, self)
  File /usr/local/bin/zope/lib/python/ZConfig/schema.py, line 27, in 
parseResource

xml.sax.parse(resource.file, parser)
  File /usr/lib64/python2.4/site-packages/_xmlplus/sax/__init__.py, line 
31, in parse

parser.parse(filename_or_stream)
  File /usr/lib64/python2.4/site-packages/_xmlplus/sax/expatreader.py, 
line 109, in parse

xmlreader.IncrementalParser.parse(self, source)
  File /usr/lib64/python2.4/site-packages/_xmlplus/sax/xmlreader.py, 
line 123, in parse

self.feed(buffer)
  File /usr/lib64/python2.4/site-packages/_xmlplus/sax/expatreader.py, 
line 216, in feed

self._parser.Parse(data, isFinal)
  File /usr/lib64/python2.4/site-packages/_xmlplus/sax/expatreader.py, 
line 311, in start_element

self._cont_handler.startElement(name, AttributesImpl(attrs))
  File /usr/local/bin/zope/lib/python/ZConfig/schema.py, line 99, in 
startElement

getattr(self, start_ + name)(attrs)
  File /usr/local/bin/zope/lib/python/ZConfig/schema.py, line 475, in 
start_schema

keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
  File /usr/local/bin/zope/lib/python/ZConfig/schema.py, line 201, in 
get_sect_typeinfo

datatype = self.get_datatype(attrs, datatype, null, base)
  File /usr/local/bin/zope/lib/python/ZConfig/schema.py, line 194, in 
get_datatype

return self._registry.get(dtname)
  File /usr/local/bin/zope/lib/python/ZConfig/datatypes.py, line 398, in 
get

t = self.search(name)
  File /usr/local/bin/zope/lib/python/ZConfig/datatypes.py, line 423, in 
search

package = __import__(n, g, g, component)
  File /usr/local/bin/zope/lib/python/Zope2/Startup/datatypes.py, line 
20, in ?

from ZODB.config import ZODBDatabase
  File /usr/local/bin/zope/lib/python/ZODB/__init__.py, line 20, in ?
from persistent import TimeStamp
  File /usr/local/bin/zope/lib/python/persistent/__init__.py, line 19, 
in ?

from cPersistence import Persistent, GHOST, UPTODATE, CHANGED, STICKY
ImportError: /usr/local/bin/zope/lib/python/persistent/cPersistence.so: 
undefined symbol: PyUnicodeUCS2_AsEncodedString



I configured this to use /usr/local/bin/python (2.4.2 compiled) instead of 
the default /usr/bin/python (2.4.1 package).


I searched the archives to look for something here, and I've found one 
similar thread:


http://www.gossamer-threads.com/lists/zope/users/163264?search_string=%2Bzopectl%20%2Bimporterror;#163264

which mentions some possibilities:

Ah. uhm.. sorry. This traceback can only occur when cPersistence.so
wasnt compiled yet, has been deleted, is for the wrong python version
or is otherwise unavailable.
It is usually generated thru installation/compilation.

I'd check paths for INSTANCE_HOME, SOFTWARE_HOME etc;
which python version is used (and if its different to
the version you installed with) 

So far with this installation, the only (as far as I can tell) 
modification from the vanilla installation is that I'm using a seperate 
python instance on the box.  Otherwise it's a simple configure/make/make 
install from the /tmp directory.


I installed zope to /usr/local/bin/zope and given my regular user write 
permissions (via group) to that 

Re: [Zope] Strange errors while 'make'ing

2006-03-21 Thread David




a blob of green gelatin wrote:
On Tue, 21 Mar 2006, Chris McDonough wrote:
  
  
  These are warnings coming from GCC (as
opposed to errors, which would prevent compilation from finishing).


GCC 4.X emits these pointer signedness warnings whereas earlier GCC
versions did not. This issue has been fixed on the Zope trunk, I
believe (the codebase which will become Zope 2.10).

  
  
Thanks for the answer!
  
  
I went ahead and continued then with my installation.
  
  
after running 'make install' with no problems, I created an instance
via the /usr/local/bin/zope/bin/mkzopeinstance.py script. The script
ran fine with no errors.
  
  
Following the INSTALL.txt file in the Zope directory, my next step
would be to head over to my installed instance and run the zopectl
script to get things going.
  
  
When I ran it, I get the following:
  
  
slimemold[62]:/home/jello/zope/bin% ./zopectl start
  
Traceback (most recent call last):
  
 File "/usr/local/bin/zope/lib/python/Zope2/Startup/zopectl.py", line
316, in ?
  
 main()
  
 File "/usr/local/bin/zope/lib/python/Zope2/Startup/zopectl.py", line
274, in main
  
 options.realize(args)
  
 File "/usr/local/bin/zope/lib/python/Zope2/Startup/zopectl.py", line
91, in realize
  
 ZDOptions.realize(self, *args, **kw)
  
 File "/usr/local/bin/zope/lib/python/zdaemon/zdoptions.py", line 273,
in realize
  
 self.load_schema()
  
 File "/usr/local/bin/zope/lib/python/zdaemon/zdoptions.py", line 321,
in load_schema
  
 self.schema = ZConfig.loadSchema(self.schemafile)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/loader.py", line 31, in
loadSchema
  
 return SchemaLoader().loadURL(url)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/loader.py", line 65, in
loadURL
  
 return self.loadResource(r)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/loader.py", line 159, in
loadResource
  
 schema = ZConfig.schema.parseResource(resource, self)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/schema.py", line 27, in
parseResource
  
 xml.sax.parse(resource.file, parser)
  
 File "/usr/lib64/python2.4/site-packages/_xmlplus/sax/__init__.py",
line 31, in parse
  
 parser.parse(filename_or_stream)
  
 File
"/usr/lib64/python2.4/site-packages/_xmlplus/sax/expatreader.py", line
109, in parse
  
 xmlreader.IncrementalParser.parse(self, source)
  
 File "/usr/lib64/python2.4/site-packages/_xmlplus/sax/xmlreader.py",
line 123, in parse
  
 self.feed(buffer)
  
 File
"/usr/lib64/python2.4/site-packages/_xmlplus/sax/expatreader.py", line
216, in feed
  
 self._parser.Parse(data, isFinal)
  
 File
"/usr/lib64/python2.4/site-packages/_xmlplus/sax/expatreader.py", line
311, in start_element
  
 self._cont_handler.startElement(name, AttributesImpl(attrs))
  
 File "/usr/local/bin/zope/lib/python/ZConfig/schema.py", line 99, in
startElement
  
 getattr(self, "start_" + name)(attrs)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/schema.py", line 475, in
start_schema
  
 keytype, valuetype, datatype = self.get_sect_typeinfo(attrs)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/schema.py", line 201, in
get_sect_typeinfo
  
 datatype = self.get_datatype(attrs, "datatype", "null", base)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/schema.py", line 194, in
get_datatype
  
 return self._registry.get(dtname)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/datatypes.py", line 398,
in get
  
 t = self.search(name)
  
 File "/usr/local/bin/zope/lib/python/ZConfig/datatypes.py", line 423,
in search
  
 package = __import__(n, g, g, component)
  
 File "/usr/local/bin/zope/lib/python/Zope2/Startup/datatypes.py",
line 20, in ?
  
 from ZODB.config import ZODBDatabase
  
 File "/usr/local/bin/zope/lib/python/ZODB/__init__.py", line 20, in ?
  
 from persistent import TimeStamp
  
 File "/usr/local/bin/zope/lib/python/persistent/__init__.py", line
19, in ?
  
 from cPersistence import Persistent, GHOST, UPTODATE, CHANGED,
STICKY
  
ImportError: /usr/local/bin/zope/lib/python/persistent/cPersistence.so:
undefined symbol: PyUnicodeUCS2_AsEncodedString
  
  
  
I configured this to use /usr/local/bin/python (2.4.2 compiled) instead
of the default /usr/bin/python (2.4.1 package).
  
  
I searched the archives to look for something here, and I've found one
similar thread:
  
  
http://www.gossamer-threads.com/lists/zope/users/163264?search_string=%2Bzopectl%20%2Bimporterror;#163264
  
  
which mentions some possibilities:
  
  
"Ah. uhm.. sorry. This traceback can only occur when cPersistence.so
  
wasnt compiled yet, has been deleted, is for the wrong python version
  
or is otherwise unavailable.
  
It is usually generated thru installation/compilation.
  
  
I'd check paths for INSTANCE_HOME, SOFTWARE_HOME etc;
  
which python version is used (and if its different to
  
the version you installed with) "
  
  
So far with this installation, the only (as far as I can tell)
modification from the vanilla installation is that I'm using a seperate
python instance on the box. Otherwise 

[Zope-DB] TAL and empty sql-list

2006-03-21 Thread Jonas Nielsen

I have an sql statement that given a username it returns a project.

So my first question is: Is it possible to let the statement return a 
string instead of a list. i.e. 'project' instead of ['project'] ?


So, if call it from a page template, I can use

div tal:content=python:here.project(uname=username)[0].project /

But if the project method returns an empty list, this statement will 
fail (because of [0]).


So what is a smart solution to this ? I've tried putting a repeat 
statement around this, and tried defining a variable called projectExist 
using len on the function. This however makes the page template very 
complex when calling another sql method such as:


div 
tal:python:here.membersInSectionAndProject(section=sectionList[0].section, 


   project=projectList[0].project) /

if I'm using, say, the Python Database API I would just call fetchone() 
on the cursor object. It is that functionality I am looking for.





___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] TAL and empty sql-list

2006-03-21 Thread Charlie Clark

On 2006-03-21 at 15:21:29 [+0100], Jimmy small [EMAIL PROTECTED] wrote:
 sorry for the double post --
 A python script would be your best bet.  You would be able to use that
 in other areas of your site in that case.

At least as long as TALES doesn't support this directly.

In a PythonScript you can use the .names() method of your results object to 
create an empty tuple for your results.

Charlie
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


Re: [Zope-DB] TAL and empty sql-list

2006-03-21 Thread Maciej Wisniowski

If you really have to do it in TAL try:

div tal:define=results python:here.project(uname=username)
   tal:content=python: results and results[0].project or '---'  /

--
Maciej Wisniowski
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db