Re: [Zope-dev] syslog

2001-10-03 Thread Toby Dickenson

On Mon, 1 Oct 2001 20:53:00 +0200, Jerome Alet [EMAIL PROTECTED] wrote:

On Mon, Oct 01, 2001 at 04:14:47PM +0100, Toby Dickenson wrote:
 
 A question for all syslog users; is it ever useful to send access logs to
 syslog? (I can't think of good reason, but my syslog zen quotient is still
 low). Is anyone else even using syslog?

It may prove to be useful when you want to do remote logging: you
send all to the local syslog which in fact forwards it to a remote 
syslog server.

I understand the interest for remote logging of events - thats what I
am using syslog for.

Does the same apply to access logs too? (that is, the entries which
also get written to var/Z2.log)

Toby Dickenson
[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 )



Re: [Zope-dev] syslog

2001-10-03 Thread Jerome Alet

On Wed, 3 Oct 2001, Toby Dickenson wrote:

 On Mon, 1 Oct 2001 20:53:00 +0200, Jerome Alet [EMAIL PROTECTED] wrote:
 
 It may prove to be useful when you want to do remote logging: you
 send all to the local syslog which in fact forwards it to a remote 
 syslog server.
 
 I understand the interest for remote logging of events - thats what I
 am using syslog for.
 
 Does the same apply to access logs too? (that is, the entries which
 also get written to var/Z2.log)

Sorry, I don't know. In fact I don't use syslog with Zope, this was just a
general answer. Because Apache is often used in front of Zope, it's
probably even better (quicker) to let Apache do the access logging and
disable it entirely from Zope. 

bye,

Jerome Alet


___
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] file descriptors on Solaris

2001-10-03 Thread R. David Murray

On Tue, 2 Oct 2001, John Ziniti wrote:
 Yeah ... something tells me it's a little more complicated than that.

Like recompiling the kernel, quite possibly.  On FreeBSD there's
a sysctl, although you may still have to recompile the kernel in
some cases I think; on Linux you can zap a variable in proc.  On
solariswho knows wry grin.

 Any advice on the other front?  If I can reduce the number of files
 Zope needs to process this request, I'd grumpily agree to do that,
 is Zope opening a file for every input name=x.name:records?
 Will using input name=x_names:list help?

I don't see why zope should need so many file descriptors.  But
you may have to start tracing code frown.

I have previously noticed a related phenomenon: on FreeBSD when
I start zope, *something* tries to open every possible port
number using a separate file descriptor. They must
then be closed, because after startup only the ports requested
are still open.  I determined this by running lsof and capturing
the output.

In this case, it appears to be benign; the only negative consequence
is the appearance of the Too many open file descriptors message
in /var/log/messages.

--RDM


___
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] ZCatalog: path summary indices not generated

2001-10-03 Thread Andreas Jung


- Original Message -
From: Shane Rowatt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 00:54
Subject: [Zope-dev] ZCatalog: path  summary indices not generated

 Unfortunately I tried the same with the 'path' index by adding the
following
 to DTMLMethod.py

 def getPath(self):
  Get path
  return getPath(self)

 def path(self):
  Get path
  return join(self.getPhysicalPath(), /)

 but the 'path' index only works it is a FieldIndex. When it's a PathIndex
I
 get the value of None for all cataloged items.


Shane,

you don't have to provide special path() to your objects. The PathIndex
works
a bit different from the other indexes because it does not look for an
attribute
or method with a name equal to the name of your PathIndex. So how do
PathIndexes work ?

- ZCatalog calls PathIndex.index_object() for all objects to be cataloged.
- index_object() determines the physical path the object and indexes this
result
  inside the PathIndex data structure.

We have not seen necessity to provide support for a user-defined hook. If
you have some
use cases let me know.

Hope this helps ;-)

Andreas


___
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] [Fwd: Re: [Zope] Python 2.1 for debian ?]

2001-10-03 Thread Jim Washington


Would it be smart to include the python header files in the zope binary 
distributions?  That would seem to solve a few problems for the 
individuals using them.

-- Jim Washington

 Original Message 
Subject: Re: [Zope] Python 2.1 for debian ?
Date: Wed, 03 Oct 2001 12:51:37 + (GMT)
From: Julián Muñoz Domínguez [EMAIL PROTECTED]
To: Jim Washington [EMAIL PROTECTED]



Thank you very very much ;-)

But it is not possible to compile extensions with zope binary
distributions, because it lacks some headers. Many products requires
compiling extensions, so that readdress me to need of Python 2.1 . 






___
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: Re: [Zope] Python 2.1 for debian ?]

2001-10-03 Thread Matthew T. Kromer

Jim Washington wrote:


 Would it be smart to include the python header files in the zope 
 binary distributions?  That would seem to solve a few problems for the 
 individuals using them.

 -- Jim Washington

The next binary release will go out the door with Python headers 
installed.   We've already set it up for the packager to do that.



___
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: Re: [Zope] Python 2.1 for debian ?]

2001-10-03 Thread Leonardo Rochael Almeida



Matthew T. Kromer wrote:

 The next binary release will go out the door with Python headers 
 installed.   We've already set it up for the packager to do that.


Does that mean that using the binary Zope bundled python to call 
setup.py or using the binary Zope bundled Makefile.pre.in will correctly 
build C modules and install them correctly inside the binary Zope python 
tree?!

scriptkiddie
   Th@t w0u1d b3 'l33t
/scriptkiddie


Cheers, Leo


___
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] compiling Zope 2.4.1 on Mac OS 10.1

2001-10-03 Thread Leonardo Rochael Almeida



Mitchell L Model wrote:

 [...] With the updates for OS 10.1 in Python 2.2a4, all I had to do 
 to make both Python and Zope was:
 
 cd Python2.2a4
 configure --with-suffix=.exe
 make
 sudo make install
 
 cd Zope
 python wo_pcgi.py


I don't know if it's just me, but this --with-suffix=.exe, on an Mac 
OS (the OS where you weren't suppose to need extensions) is extremely 
disturbing. :-)

Cheers, Leo

PS: and I'm not a Mac user, just a Linux user who would like more 
metadata in his operating system. Maybe I've been in Zope land for too 
long :-)


___
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] compiling Zope 2.4.1 on Mac OS 10.1

2001-10-03 Thread Jens Vagelpohl

well, the actual extension does not matter. you could as well specify 
something like --with-suffix=.mary_had_a_little_lamb if you wanted...

for a more technological explanation, when the compile is done the 
executable is copied into the root of the python source tree. by default 
the name of the executable is python.

this would not be a problem if it was not for the case insensitivity of 
the HFS file system used by most OS X users. there is a folder named 
Python in the root of the tree as well. trying to copy python into the 
root will fail because it collides with Python.

the --with-suffix will produce a binary with that suffix and that will 
avoid this collision.

jens


On Wednesday, October 3, 2001, at 11:03 , Leonardo Rochael Almeida wrote:



 Mitchell L Model wrote:

 [...] With the updates for OS 10.1 in Python 2.2a4, all I had to do to 
 make both Python and Zope was:
 cd Python2.2a4
 configure --with-suffix=.exe
 make
 sudo make install
 cd Zope
 python wo_pcgi.py


 I don't know if it's just me, but this --with-suffix=.exe, on an Mac OS 
 (the OS where you weren't suppose to need extensions) is extremely 
 disturbing. :-)

   Cheers, Leo

 PS: and I'm not a Mac user, just a Linux user who would like more 
 metadata in his operating system. Maybe I've been in Zope land for too 
 long :-)


 ___
 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 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] RFC: Date property requiers valid date (no more)

2001-10-03 Thread Johan Carlsson

Hi,
We currently want to use date-properties in the regular property sheet.
The current date-property doesn't accept an empty value.
We want to be able to submit an empty string and set a NullDate value
indicating. Also a NullDate value should return an empty string when the
manage_propertiesForm is rendered, e.g. showing an empty field.

We have currently chosen a empty string , to represent the NullDate value.
(We haven't found any NullDate representation in DateTime and have concluded
that it doesn't exist?)
Choosing None as the NullDate value would have been preferred but it
generates
issues with the rendering of  manage_propertiesForm.


Question:

Is there anything better then an empty string for the NullDate value?

Best Regards,
Johan Carlsson
www.torped.se


[Here's our hot-patch]

from ZPublisher import Converters

def fixedfield2date(v):
print Fixed field2date conversion, fixedfield2date, v
from DateTime import DateTime
if hasattr(v,'read'): v=v.read()
else: v=str(v)
if v=='':
   return v
return DateTime(v)

Converters.field2date = fixedfield2date
Converters.type_converters['date'] = fixedfield2date

print ZPublisher.Converters.field2date patched.




___
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: Re: [Zope] Python 2.1 for debian ?]

2001-10-03 Thread Matthew T. Kromer


On Wednesday, October 3, 2001, at 10:53 AM, Leonardo Rochael Almeida 
wrote:



 Matthew T. Kromer wrote:

 The next binary release will go out the door with Python headers 
 installed.   We've already set it up for the packager to do that.


 Does that mean that using the binary Zope bundled python to call 
 setup.py or using the binary Zope bundled Makefile.pre.in will 
 correctly build C modules and install them correctly inside the binary 
 Zope python tree?!

Yes, I think at least the first part is true, such that setup.py build 
will work -- the ability of install to function is dependent on your 
permissions, of course.


___
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] ZCatalog: path summary indices not generated

2001-10-03 Thread Casey Duncan

On Wednesday 03 October 2001 12:54 am, Shane Rowatt allegedly wrote:
 Zope Version: 2.4.1 on linux.

 When I tried to add a ZCatalog followed by finding objects to index using
 the default indices provided (path, summary, id, title etc), the 'path' and
 'summary' indices are never generated. The 'summary' index is always an
 empty string and the 'path' index is 'None'.

Summary is not defined (as you found) for most plain objects. CatalogAware 
defines it, but unfortunately without stripping tags. You might check out my 
DTMLDocumentExt code which renders the document and strips the html tags. It 
is an extension of some code Dieter posted online a while back. You can find 
it at:

http://www.zope.org/Members/Kaivo/DTMLDocumentExt

[snip]

 Surely someone else has come across these problems before using this basic
 catalog stuff??

Yup 8^)


 Shane Rowatt
 Astracon Inc.

hth
/---\
  Casey Duncan, Sr. Web Developer
  National Legal Aid and Defender Association
  [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 )



RE: [Zope-dev] [Fwd: Re: [Zope] Python 2.1 for debian ?]

2001-10-03 Thread Brian Lloyd

 Would it be smart to include the python header files in the zope binary 
 distributions?  That would seem to solve a few problems for the 
 individuals using them.

We'll be doing this as of Zope 2.4.2 (early next week, I hope).

Brian Lloyd[EMAIL PROTECTED]
Software Engineer  540.361.1716   
Zope Corporation   http://www.zope.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] file descriptors on Solaris - IT'S A BUG, PEOPLE!

2001-10-03 Thread Richard Jones

On Wednesday 03 October 2001 22:00, R. David Murray wrote:
 On Tue, 2 Oct 2001, John Ziniti wrote:
  Yeah ... something tells me it's a little more complicated than that.

 Like recompiling the kernel, quite possibly.  On FreeBSD there's
 a sysctl, although you may still have to recompile the kernel in
 some cases I think; on Linux you can zap a variable in proc.  On
 solariswho knows wry grin.

  Any advice on the other front?  If I can reduce the number of files
  Zope needs to process this request, I'd grumpily agree to do that,
  is Zope opening a file for every input name=x.name:records?
  Will using input name=x_names:list help?

 I don't see why zope should need so many file descriptors.  But
 you may have to start tracing code frown.

As I mentioned yesterday, this is a _bug_ in cgi.py which is fixable by 
getting the patch from:

http://sourceforge.net/tracker/?group_id=5470atid=105470func=detailaid=231249


Richard

___
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] RFC: Date property requiers valid date (no more)

2001-10-03 Thread Joseph Wayne Norton


Johan -

I have done a similiar hotfix by using None - which I think is a
better alternative than ''.

If you want to see all of the source, download the following Product,
http://www.zope.org/Members/natsukashi/Products/CMFPropertyCore, and
look inside the file CMFPropertyCore/LinkPropertyManager.py

1) I created my own converter functions and simply call the real
function if the value is not none.  Here is an excerpt from a file
called LinkPropertyManager.py:

from OFS.PropertyManager import PropertyManager
from ZPublisher import Converters

class LinkPropertyManager(PropertyManager):

def field2float(v):
if not v:
return None
else:
return Converters.field2float(v)
def field2int(v):
if not v:
return None
else:
return Converters.field2int(v)
def field2long(v):
if not v:
return None
else:
return Converters.field2long(v)
def field2date(v):
if not v:
return None
else:
return Converters.field2date(v)
def field2link(v):
if hasattr(v,'read'): v=v.read()
else: v=str(v)
return v

type_converters = Converters.type_converters
type_converters.update({'float'  : field2float
, 'int'  : field2int
, 'long' : field2long
, 'date' : field2date
, 'link' : field2link
})

PropertyManager.type_converters = LinkPropertyManager.type_converters

2) Since you are patching the type converter, you might as well patch
the manage_propertiesForm.  This can be done by hotfixing the
OFS.PropertyManager.PropertyManager.manage_propertiesForm value with
your own dtml file.

Here is a diff between the CMFPropertyCore/dtml/properties.dtml file
and zope's properties.dtml file.

bash$ diff -c properties.dtml
/opt/arseed/tfs-lib/zope/zope-2.4.1/lib/python/OFS/dtml/properties.dtml
*** properties.dtml Thu Aug  9 10:41:41 2001
---
/opt/arseed/tfs-lib/zope/zope-2.4.1/lib/python/OFS/dtml/properties.dtml
Wed Oct  3 07:49:38 2001
***
*** 58,74 
dtml-if type == 'int'
input type=text name=dtml-var id:dtml-var 
 type size=35 value=dtml-if hasProperty(id)dtml-var 
!'%s' % (getProperty(id) or '') html_quote/dtml-if
dtml-elif type == 'long'
input type=text name=dtml-var id:dtml-var type size=35
 value=dtml-if hasProperty(id)dtml-var 
!('%s' % (getProperty(id) or ''))[:-1] html_quote/dtml-if
dtml-elif type in ('float', 'date')
input type=text name=dtml-var id:dtml-var type size=35
!value=dtml-var getProperty(id) html_quote null=
dtml-elif type=='string'
input type=text name=dtml-var id:string size=35
!value=dtml-var getProperty(id) html_quote null=
dtml-elif type=='boolean'
input type=checkbox name=dtml-var id:boolean size=35
 dtml-if getProperty(id)CHECKED/dtml-if
--- 58,74 
dtml-if type == 'int'
input type=text name=dtml-var id:dtml-var 
 type size=35 value=dtml-if hasProperty(id)dtml-var 
!'%s' % getProperty(id) html_quote/dtml-if
dtml-elif type == 'long'
input type=text name=dtml-var id:dtml-var type size=35
 value=dtml-if hasProperty(id)dtml-var 
!('%s' % getProperty(id))[:-1] html_quote/dtml-if
dtml-elif type in ('float', 'date')
input type=text name=dtml-var id:dtml-var type size=35
!value=dtml-var getProperty(id) html_quote
dtml-elif type=='string'
input type=text name=dtml-var id:string size=35
!value=dtml-var getProperty(id) html_quote
dtml-elif type=='boolean'
input type=checkbox name=dtml-var id:boolean size=35
 dtml-if getProperty(id)CHECKED/dtml-if
***
*** 77,83 
 value=dtml-in getProperty(id)dtml-var sequence-item
html_quote /dtml-in
dtml-elif type=='text'
textarea name=dtml-var id:text rows=6 cols=35dtml-var 
!getProperty(id) html_quote null=/textarea
dtml-elif type=='lines'
textarea name=dtml-var id:lines rows=6 cols=35dtml-in
getProperty(id)dtml-var sequence-item html_quotedtml-if
--- 77,83 
 value=dtml-in getProperty(id)dtml-var sequence-item
html_quote /dtml-in
dtml-elif type=='text'
textarea name=dtml-var id:text rows=6 cols=35dtml-var 
!getProperty(id) html_quote/textarea
dtml-elif type=='lines'
textarea name=dtml-var id:lines rows=6 cols=35dtml-in
getProperty(id)dtml-var sequence-item html_quotedtml-if
***
*** 91,97 
dtml-in getProperty(select_variable)
   option
dtml-if
_['sequence-item']==getProperty(id)SELECTED/dtml-if
!   dtml-var sequence-item html_quote null= /option
/dtml-in
  /select
  /div
--- 91,97 
dtml-in getProperty(select_variable)
   option
dtml-if
_['sequence-item']==getProperty(id)SELECTED/dtml-if
!   dtml-var sequence-item 

Re: [Zope-dev] file descriptors on Solaris - IT'S A BUG, PEOPLE!

2001-10-03 Thread Richard Jones

[cc'ed to zope-dev so people can check this information]

On Thursday 04 October 2001 13:47, Joseph Wayne Norton wrote:
 One related question that I have regarding cgi.py and zope.

 Would there be any compatibility problem of applying the following
 older cgi hotfix to python's cgi.py file and usage with Zope 2.4.1 and
 higher?

   python cgi hotfix:
 http://sourceforge.net/tracker/?group_id=5470atid=105470func=detailaid=4
43120

   zope hotfix:
 http://www.zope.org/Products/Zope/Hotfix_2001-07-25/README.txt

 My understanding is that the zope hotfix is not required for version
 2.4.1 and higher.

Zope 2.4.1 includes the hotfix. The hotfix does not fix the too many open 
files problem. I don't believe there's any compatibility problems (we're 
using both OK here).


Richard

___
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 )