RE: [Zope-dev] (no subject)

2000-10-14 Thread ralf . herold

Hello Dieter, dear list readers,

I recently asked how to read in and render the contents of 
an external file, which doesn't work anymore using 
Zope 2.2.2 an LocalFS' xxx.read(), and You responded that

 The quickest solution for you would be an external method
 that gets the file, performs the "read" and returns the result.

Now I use in an external method fsreadin a .py-module with

import sys
def readinfile (self, html):
"""Ralf Herolds way to read in local file objects."""
file = open(html, "r")
filecontent = file.read()
file.close()
return filecontent

which is referenced in a DTML method by 
dtml-var "fsreadin('/tmp/var/thewantedtext.html')".

It works, but I almost cannot believe that this is that 
simple - am I missing something, is security a concern?

Thanks for answering, Yours. Ralf Herold
mailto:[EMAIL PROTECTED]  http://www.knm-poh.charite.de/ 

 -Original Message-
 From: Dieter Maurer [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 04, 2000 1:46 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Zope-dev] (no subject)

 In earlier Zope versions, a method without a permission meant
 "can be used freely". Now, it means "cannot be used via DTML/URL".
 


___
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] New ZPatterns documentation on the Wiki

2000-10-14 Thread Phillip J. Eby

There is a new document on the Wiki which explains in excruciating detail
how triggers/rules work in ZPatterns:


http://www.zope.org/Members/pje/Wikis/ZPatterns/HowTriggersWork

I have also now completed the SkinScript reference documentation at:


http://www.zope.org/Members/pje/Wikis/ZPatterns/SkinScriptSyntax

In addition to a detailed definition of all SkinScript statements,
variables, and syntax, the reference includes 19 short "real world"
SkinScript examples ranging from very simple to very complex.  Examples
include data movement to/from SQL and ZCatalog, as well as other
Specialists, and various kinds of "alert"-type triggers.

Please note that the SkinScript syntax described is "slightly ahead of its
time" in documenting a few features that are only available in an as-yet
unreleased ZPatterns.  I'm holding up the release of 0.4.3 for additional
documentation and I'm also waiting on Ty to get a LoginManager 0.8.8
release together, as there were some changes that had to be made to LM for
compatibility with ZPatterns 0.4.3, relating to my recent addition of
ZClass support for PlugIns (yay!).

Feedback on the above documentation is welcome.  Thanks.

  _
   _/__)
___/


___
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] Inconsistent behaviour in Zope's constructor security check?

2000-10-14 Thread Stephen Simmons

I have just concluded an epic two day struggle with Zope's security
machinery. I think I've won, and wanted to find out whether anyone else has
had similar problems.
I had defined a Python product that worked very nicely. I was able
to add and delete my objects and edit, copy and export them perfectly well.
But when I tried to rename, paste or import them, I got an exception saying
that "The object X does not support this operation".
It appears that security checks for permission to add an object to a
Folder is done differently by the Product Add machinery and the CopySupport
machinery that paste/rename/import use.
I had defined my constructors slightly unconventionally in
__init__.py. Redefining the constructors more normally solved my immediate
problem, but it doesn't remove the source of Zope's inconsistent behaviour.
More details of the diagnosis are at the end of this email, for those who
are interested.

Is this something I should put in the collector?

One happy result of this mess is that I am now on a first-name basis with
about 80% of the Zope source code!

Stephen
___
Stephen Simmons, [EMAIL PROTECTED]
HealthArena B.V., Amsterdam, The Netherlands
phone +31 20 486 0555; mobile +31 6 1505 3086; fax +31 20 486 0559

Problem copying/pasting and renaming


I was able to create new instances of my Element class, but whenever I tried
to rename, cut/paste or import the objects, _verifyObjectPaste() in
CopySupport.py raised a Copy Error (The object X does not support this
operation).

_verifyObjectPaste() performs three checks:
(i)  The container is happy having an object of this type being pasted into
it
(ii) The user is allowed to create new objects of this type
(iii) The user is able to access the object being pasted or renamed

All three conditions were true, so there is no reason why renaming, etc
should be prevented. Especially when I could create objects as desired
through the management screens.

Solution


The problem was traced to the unusual way I had defined the constructors in
__init__.py and the class's module. It appears that
getSecurityManager().validateValue(meth) does not exactly duplicate the
check done when adding a product instance.

Originally, I removed the constructor definition tuple from __init__.py:
  def initialize(context):
   """Register Element"""
   context.registerClass(
PlatformElement.Element,
constructors = (PlatformElement.Element), # Specified indirectly!
icon = element.gif
  )

and put it at the end of my class definition module, PlatformElement.py:
  class Element(Folder):
...

  def manage_addElement(self, id, name='', title='', REQUEST=None):
  """Create an Element"""
  ...

  Element_constructors = (
   ('manage_addElementForm', HTMLFile('Element_add', globals())),
('manage_addElement', manage_addElement),
  )

In this case, check (ii) was failing at line 390 of CopySupport.py when
trying to validate the constructor
manage_addProduct/HAPlatform/manage_addElementForm.

The problem was fixed by changing the constructor definition to the more
conventional form:

In __init__.py:
  def initialize(context):
   """Register Element"""
   context.registerClass(
PlatformElement.Element,
   constructors = ( # Specify constructors explicitly!
PlatformElement.manage_addElementForm,
PlatformElement.manage_addElement,
),
 icon = element.gif
  )

In PlatformElement.py:
  ...
  manage_addElementForm = HTMLFile('Element_add', globals())

  def manage_addElement(self, id, name='', title='', REQUEST=None):
  """Create an Element"""
  ...

While this fixes the problem, it leaves unresolved the question of why
Zope's security machinery was happy using the original constructors but
barfed when checking whether it could use them.





___
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] object properties

2000-10-14 Thread Matt

Can someone give me an example, either in dtml or external methods of
accessing or listing the properties of the current object I am calling a
method on.

Or point me to a source

Matt Bion





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




Re: [Zope] ZCatalog question. boolean and wildcards.

2000-10-14 Thread Dieter Maurer

Hannes Grund writes:
  When mixing boolean operators and wildcards '*' in queries within a Textindex
  the 'AND' operator is replaced by 'OR'. 
  Also, the possibility of constructing nested terms using brackets seems 
  to be not supported (contrary to the chapter 'Searching and indexing' from the Zope 
 book).
  The setting is straightforward, several indexes (text-index, keyword-indexes)
  are used indexing a about 5000 Zclasses.
  Are there any patches to apply or what else can i do ?
Sorry, the patch I posted yesterday was not complete.

There have been too more problems:

  * if the wildcard expansion could not find matching words,
my patch created an empty subquery.
Such queries, unfortunately, can not be handled by
"UnTextIndex.evaluate".

The new patch, instead creates a new search term,
'no_expansion_for_pattern'. Hopefully, this term is not
indexed and thus gives the same results as
the empty subquery.

Of cause, this is a hack.
The ZCatalog maintainer should find a better solution.

  * The ZCatalog, more precisely, "UnTextIndex.__getitem__"
still raises an "IndexError" exception, when one searches
for a term that is not indexed.
The result is "no data matches your query", even for
an "or" query.

I had already put a patch for this error in the collector
for Zope 2.2.1, but apparently, DC decided not to
look at it.


Please discard my patch from yesterday.
You may give the new patch (appended) a try.


Dieter

--- lib/python/SearchIndex/:GlobbingLexicon.py  Mon Aug 28 19:30:06 2000
+++ lib/python/SearchIndex/GlobbingLexicon.py   Sat Oct 14 11:54:24 2000
@@ -230,10 +230,22 @@
 if ( (self.multi_wc in w) or
 (self.single_wc in w) ):
 wids = self.get(w)
-for wid in wids:
-if words:
-words.append(Or)
-words.append(self._inverseLex[wid])
+#for wid in wids:
+#if words:
+#words.append(Or)
+#words.append(self._inverseLex[wid])
+   if wids:
+   words.append(map(self._inverseLex.get,wids))
+   else:
+   words.append('no_expansion_for_' + w)
+   # We do this here, as "UnTextIndex.evaluate"
+   #can not handle empty subqueries
+   # We use as expansion some expression that
+   #is likely not in the catalog but
+   #gives some indication to the problem
+   #in case "ResultList" does something
+   #with its "src" argument.
+   #This is a hack, though!
 else:
 words.append(w)
 
--- lib/python/SearchIndex/:UnTextIndex.py  Fri Oct 13 23:29:00 2000
+++ lib/python/SearchIndex/UnTextIndex.py   Sat Oct 14 11:57:38 2000
@@ -347,8 +347,10 @@
 if len(src) == 1:
 src=src[0]
 if src[:1]=='"' and src[-1:]=='"': return self[src]
-r = self._index.get(self.getLexicon(self._lexicon).get(src)[0],
-None)
+   codes= self.getLexicon(self._lexicon).get(src)
+   if codes:
+r = self._index.get(codes[0], None)
+   else: r= None # maybe do something, if len(codes)  1
 if r is None: r = {}
 return ResultList(r, (src,), self)
 
@@ -490,11 +492,11 @@
 except IndexError: raise QueryError, "Malformed query"
 
 t=type(left)
-if t is ListType: left = evaluate(left, self)
+if t is ListType: left = self.evaluate(left)
 elif t is StringType: left=self[left]
 
 t=type(right)
-if t is ListType: right = evaluate(right, self)
+if t is ListType: right = self.evaluate(right)
 elif t is StringType: right=self[right]
 
 return (left, right)

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




[Zope] dtml-tree does weird things

2000-10-14 Thread Matt

Hi, I have the following in a dtmlDocument.

dtml-tree branches_expr="folder_of_things.objectValues(['Folder', 'DTML
Document'])"
   dtml-var id
/dtml-tree

the folder folder_of_things contains numerous things, including some
documents and folders.  The problem seems to be that each time I expand the
tree node, I get a repeat of the original list of nodes, as if it is
listing itself recursively, but not decending down the object hierachy.

An when I roll over a node '+' of one of the documents is :
http://localhost:8080/admin_test/some_tree_examples?tree-e=eJyLVneEAteqbFt1HQUEvzLZVj0WAIkQCHY#Eyc=

if I expand the tree and roll over the repeat entry I get the same link.

What's happening?

I am running 2.2.2 stable.

By they way : the simple example in the user man doesn't return anyhthing
on a folder that itself contains folders and dtml documents.  I.e.
dtml-tree
   dtml-var id
/dtml-tree

any help would be greatly appretiated,
Matt Bion



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




Re: [Zope] object properties

2000-10-14 Thread Kapil Thangavelu

Matt wrote:
 
 Can someone give me an example, either in dtml or external methods of
 accessing or listing the properties of the current object I am calling a
 method on.
 
 Or point me to a source
 
 Matt Bion


you can ask an object what properties it has and retrieve them through
dtml, like

dtml-if "_.hasattr(this(), 'foobar')"
dtml-var foobar
or if you want a reference, instead of a string
dtml-var "_.getattr(this(), 'foobar')"
/dtml-if

if you want to examine the propertys of an object you can go iterate
through its propertysheets (works for a zclass, the rest i'm not sure). 
You can reference the Zope Quick Reference for more info.

dtml-call "REQUEST.set('PropList', '')"

dtml-in "propertysheets.items()"
dtml-let sheet=sequence-item
dtml-in "sheet.propertyItems()"

dtml-let prop=sequence-key
dtml-call "REQUEST['PropList'].append(prop)"
/dtml-let

/dtml-in
/dtml-let
/dtml-in


dtml-if "'foobar' in PropList or
 'barfoo' in PropList or
 'guesswho' in PropList"

Success

/dtml-if



Kapil

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




[Zope] We would like to include your software

2000-10-14 Thread Chad Vogel

Hello I am Chad Vogel the Webmaster at FileHeap! I am contacting you because we would 
like to include your software in our website. FileHeap! is a software index that is 
targeted  to residential and small business users. I would greatly appreciate your 
help. 

To add your software to our index go to http://www.fileheap.com and then "submit a 
file".


Thank you,   
 
LyonL Inc.
Chad Vogel, Webmaster
[EMAIL PROTECTED]


 Chad Vogel.msg


[Zope] Re: Zope digest, Vol 1 #1016 - 28 msgs (I will be out of theoffice Monday, October 16th)office Monday, October 16th)

2000-10-14 Thread Darin Lee

I will be out of the office on Monday, October 16. If you require assistance, please 
contact the DEQ helpdesk at 241-7495.






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




Re: [Zope] object properties

2000-10-14 Thread Matt

Thanks for your response.  I tried your methods on a normal folder that
contains some other folders, dtmldocuments, and images, but it failed on the
dtml-let sheet=sequence-item which followed the  dtml-in
"propertysheets.items()".

If I used dtml-let sheet=sequence-key instead, then I always got back only
two strings, "default" and "webdav".  So I guess it is picking something else
up.  Any ideas?  Perhaps I should be using ZClasses, but I just wanted to
have what I thought would be the simple ability to loop through properties of
an object without knowing what they were before.

thanks
Matt Bion

Kapil Thangavelu wrote:

 Matt wrote:
 
  Can someone give me an example, either in dtml or external methods of
  accessing or listing the properties of the current object I am calling a
  method on.
 
  Or point me to a source
 
  Matt Bion

 you can ask an object what properties it has and retrieve them through
 dtml, like

 dtml-if "_.hasattr(this(), 'foobar')"
 dtml-var foobar
 or if you want a reference, instead of a string
 dtml-var "_.getattr(this(), 'foobar')"
 /dtml-if

 if you want to examine the propertys of an object you can go iterate
 through its propertysheets (works for a zclass, the rest i'm not sure).
 You can reference the Zope Quick Reference for more info.

 dtml-call "REQUEST.set('PropList', '')"

 dtml-in "propertysheets.items()"
 dtml-let sheet=sequence-item
 dtml-in "sheet.propertyItems()"

 dtml-let prop=sequence-key
 dtml-call "REQUEST['PropList'].append(prop)"
 /dtml-let

 /dtml-in
 /dtml-let
 /dtml-in

 dtml-if "'foobar' in PropList or
  'barfoo' in PropList or
  'guesswho' in PropList"

 Success

 /dtml-if

 Kapil


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




RE: [Zope] date comparison

2000-10-14 Thread Dieter Maurer

michael angelo ruberto writes:
  i had tried something similar already without success. here is the error
  your script caused:
  ...
  Error Type: TypeError
  Error Value: unsubscriptable object
  
  for some reason Zope just doesn't want to compare ZopeTime with
  bobobase_modification_time.

"bobobase_modification_time" is a method (at least for folder), not a value.
Use "_['bobobase_modification_time']" instead.


Dieter

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




Re: [Zope] dtml-tree does weird things

2000-10-14 Thread Dieter Maurer

Matt writes:
  dtml-tree branches_expr="folder_of_things.objectValues(['Folder', 'DTML
  Document'])"
 dtml-var id
  /dtml-tree
  
  the folder folder_of_things contains numerous things, including some
  documents and folders.  The problem seems to be that each time I expand the
  tree node, I get a repeat of the original list of nodes, as if it is
  listing itself recursively, but not decending down the object hierachy.
You have read the description for "branches_expr" carefully?

   It is the expression used by Zope to find the branches of
   the current object.

In your case, the expression is independent from the current
object. Therefore, it returns always the same branches (as you
observe).

Try:

dtml-tree folder_of_things branches_expr="objectValues(['Folder','DTML Document'])"



Dieter

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




Re: [Zope] Help Debugging External Methods

2000-10-14 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
  What are my options for debugging External Methods in Zope running on
  Windows NT?
I work under Unix. Maybe my technics are not applicable for NT.

Usually, I use "print" statements for debugging purposes.
Under Unix, I can redirect "stdout" to a file and
view the output (be sure to flush stdout after "print").

You can also use "zLog" (may be spelled differently!).
This writes log entries into the log file.
The advantages: will work under Windows, contains a timestamp.

If the external method does not need too many Zope infrastructure,
I test it outside of Zope and integrate only, when it works
properly.

When everything else does not work, I use "Test.py" and
the Python debugger "pdb".


Dieter

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




Re: [Zope] object properties

2000-10-14 Thread Matt

I tried a few things and found the following useful :

Property ids of dtml-var "PARENTS[0].id" are
dtml-var "PARENTS[0].propertyIds()"





Kapil Thangavelu wrote:

 Matt wrote:
 
  Can someone give me an example, either in dtml or external methods of
  accessing or listing the properties of the current object I am calling a
  method on.
 
  Or point me to a source
 
  Matt Bion

 you can ask an object what properties it has and retrieve them through
 dtml, like

 dtml-if "_.hasattr(this(), 'foobar')"
 dtml-var foobar
 or if you want a reference, instead of a string
 dtml-var "_.getattr(this(), 'foobar')"
 /dtml-if

 if you want to examine the propertys of an object you can go iterate
 through its propertysheets (works for a zclass, the rest i'm not sure).
 You can reference the Zope Quick Reference for more info.

 dtml-call "REQUEST.set('PropList', '')"

 dtml-in "propertysheets.items()"
 dtml-let sheet=sequence-item
 dtml-in "sheet.propertyItems()"

 dtml-let prop=sequence-key
 dtml-call "REQUEST['PropList'].append(prop)"
 /dtml-let

 /dtml-in
 /dtml-let
 /dtml-in

 dtml-if "'foobar' in PropList or
  'barfoo' in PropList or
  'guesswho' in PropList"

 Success

 /dtml-if

 Kapil


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




[Zope] trouble compiling DCOracle

2000-10-14 Thread Erik Myllymaki

I'm having some trouble compiling DCOracle on my RedHat 6.1 machine. I am
using the latest DCOracle 1.3.2 and python 1.5.2.

I used the included Setup-8.1.5 file with the addition of one library to the
*ORACLE_Includes* list:

-I$(ORACLE_HOME)/rdbms/public


The output from *make* had a number of errors, but compiled the shared
objects:

gcc -fPIC  -I/oradisk01/app/oracle/product/8.1.6/rdbms/demo
-I/oradisk01/app/oracle/product/8.1.6/rdbms/public
-I/oradisk01/app/oracle/product/8.1.6/network/public
-I/oradisk01/app/oracle/product/8.1.6/plsql/public -DDCORACLE8 -g -O2
-I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CONFIG_H -c
./oci_.c
In file included from ./oci_.c:566:
Buffer.h:79: warning: static declaration for `PyImport_Import' follows
non-static
./oci_.c: In function `_wrap_odescr':
./oci_.c:2599: warning: assignment from incompatible pointer type
gcc -shared  oci_.o  -L/oradisk01/app/oracle/product/8.1.6/lib/
-L/oradisk01/app/oracle/product/8.1.6/rdbms/lib
/oradisk01/app/oracle/product/8.1.6/rdbms/lib/defopt.o -o oci_.so
gcc -fPIC  -g -O2 -I/usr/include/python1.5 -I/usr/include/python1.5
-DHAVE_CONFIG_H -c ./Buffer.c
In file included from ./Buffer.c:60:
Buffer.h:79: warning: static declaration for `PyImport_Import' follows
non-static
gcc -shared  Buffer.o  -o Buffer.so

Testing the created shared object files went something like this:

[sweetrig@shamalama src]# python DCOracle_test.py
Traceback (innermost last):
  File "DCOracle_test.py", line 1, in ?
import Buffer, oci_, sys
ImportError: libclntsh.so.8.0: cannot open shared object file: No such file
or directory

I have tried a number of setup files that were on this list for Oracle 8.1.6
and all have produced errors. Any help appreciated.

-- 
Erik Myllymaki
[EMAIL PROTECTED]



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




Re: [Zope] object properties

2000-10-14 Thread Craig Allen

Matt wrote:
 
 I tried a few things and found the following useful :
 
 Property ids of dtml-var "PARENTS[0].id" are
 dtml-var "PARENTS[0].propertyIds()"

And of you want to actually see property values, you could try
  dtml-var propertyItems
which generates id/property tuples.

Craig
-- 
Craig Allen  - Managing Partner - Mutual Alchemy
Web Architecture - http://alchemy.nu

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




Re: [Zope] object properties

2000-10-14 Thread Kapil Thangavelu

Matt wrote:
 
 Thanks for your response.  I tried your methods on a normal folder that
 contains some other folders, dtmldocuments, and images, but it failed on the
 dtml-let sheet=sequence-item which followed the  dtml-in
 "propertysheets.items()".

i made a simple error.

this code is tested and works properly (i had set PropList to a string
instead of a list)

dtml-call "REQUEST.set('PropList', [])"

dtml-in "propertysheets.items()"
dtml-let sheet=sequence-item
dtml-in "sheet.propertyItems()"

dtml-let prop=sequence-key
dtml-call "REQUEST['PropList'].append(prop)"
/dtml-let

/dtml-in
/dtml-let
/dtml-in

dtml-var PropList

This will show all the properties of an object (zclass, folders,
documents, etc).


 If I used dtml-let sheet=sequence-key instead, then I always got back only
 two strings, "default" and "webdav".

these are the names of the propertysheets of the folder.

  So I guess it is picking something else
 up.  Any ideas?  Perhaps I should be using ZClasses, but I just wanted to
 have what I thought would be the simple ability to loop through properties of
 an object without knowing what they were before.

you mentioned above that you tried this in a folder with a couple of
other folders and images in it, if what you're trying to do is iterate
over them than you're not looking for object properties but subobjects
(attrs) which can be iterated through using 

dtml-in "objectIds(['Folder'])"
dtml-var sequence-item
dtml-in

also check out objectItems, objectValues.

or using the ZDOM methods.

regardless the http://www.zope.org/Members/ZQR is always your friend.

Cheers

Kapil

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




Re: [Zope] trouble compiling DCOracle

2000-10-14 Thread Ayhan Ergul

 The output from *make* had a number of errors, but compiled the shared
 objects:

Warnings from C compilers are always part of the fun! They say something
can potentially be/go wrong, but not necessarily so. Take a deep breath
and move on.

 Testing the created shared object files went something like this:

 [sweetrig@shamalama src]# python DCOracle_test.py
 Traceback (innermost last):
   File #34;DCOracle_test.py#34;, line 1, in ?
 import Buffer, oci_, sys
 ImportError: libclntsh.so.8.0: cannot open shared object file: No such
 file or directory


Make sure your ORACLE_HOME environment var is properly set before running
the test script. You'll probably want to put it in your zope start script
too.


Ayhan Ergul [EMAIL PROTECTED]


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




Re: [Zope] Re: Zope digest, Vol 1 #1016 - 28 msgs (I will be out ofthe office Monday, October 16th) office Monday, October 16th)

2000-10-14 Thread knight

May I ask what the relevance this post was to the list?

Regards,

Knight
[EMAIL PROTECTED]

On Sat, 14 Oct 2000, Darin Lee wrote:

 I will be out of the office on Monday, October 16. If you require assistance, please 
contact the DEQ helpdesk at 241-7495.


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




Re: [Zope] Re: Zope digest, Vol 1 #1016 - 28 msgs (I will be out ofthe office Monday, October 16th) office Monday, October 16th)

2000-10-14 Thread Matt

Just be lucky he only gets the digest ... it looks like an automated reply to me.

While I am here, thanks for the replies to my questions, they were very helpful.



knight wrote:

 May I ask what the relevance this post was to the list?

 Regards,

 Knight
 [EMAIL PROTECTED]

 On Sat, 14 Oct 2000, Darin Lee wrote:

  I will be out of the office on Monday, October 16. If you require assistance, 
please contact the DEQ helpdesk at 241-7495.

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


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




[Zope] re: trouble compiling DCOracle

2000-10-14 Thread Erik Myllymaki

--- In [EMAIL PROTECTED], Ayhan Ergul [EMAIL PROTECTED] wrote:
  The output from *make* had a number of errors, but compiled the
shared
  objects:
 
 Warnings from C compilers are always part of the fun! They say
something
 can potentially be/go wrong, but not necessarily so. Take a deep
breath
 and move on.
 
  Testing the created shared object files went something like this:
 
  [sweetrig@shamalama src]# python DCOracle_test.py
  Traceback (innermost last):
File #34;DCOracle_test.py#34;, line 1, in ?
  import Buffer, oci_, sys
  ImportError: libclntsh.so.8.0: cannot open shared object file: No
such
  file or directory
 
 
 Make sure your ORACLE_HOME environment var is properly set before
running
 the test script. You'll probably want to put it in your zope start
script
 too.
 
 
 Ayhan Ergul [EMAIL PROTECTED]


So I tried a different Setup script that I got from a post on the
zopesite:

 START SETUP Script ##

*shared*

# Setup file for Oracle 8.1.6 (Tested for Linux on Intel).
#
# Unfortunately, the libraries needed to link Oracle change from revision
# to revision.
#
# Oracle provides a make file for building "demo" programs in
# $ORACLE_HOME/rdbms/demo/demo_rdbms.mk.  I have been unable to
# use this make file to build Python extensions. Adapting it is
# not adequate, because it may change for new Oracle revs.
# My approach is to use demo_rdbms.mk to build one of the
# demo programs, look at the libraries linked, and start from there. :-(
#

ORACLE_INCLUDES=$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public
-I$(ORACLE_HOME)/network/public -I$(ORACLE_HOME)/plsql/public

ORACLE_L=-lJNLSLib3 -lgslsg8 -lnsslb8 -lserver8 -lJNLSTool -lgslssb8 -lntcp8
\
-lsgsl_s8 -lagent8 -lgslssf8 -lntcps8 -lskgxp8 -lgx8 -lntns8 \
-lskgxpd -lnus8 -lslax8 -lclient8 -lldapclnt8 -lnzjs8 \
-lslpm -lclntsh -lmm -locijdbc8 -lsql8 -lcommon8 -ln8 -locijdbc8_g \
-lsqlplus -lcore8 -lnbeq8 -lordim8 -lsvrmgrl -lnent8 -lordim8 \
-ltrace8 -lctx8 -lnhost8 -lordsdo8 -ltracefe8 -lctxc8 -lnjni8 -lordts8 \
-ltracept8 -lctxs8 -lordvirt8 -ldbicx8 -lnl8 -lowm2 \
-lvppdc -lgeneric8 -lnldap8 -lplc8 -lvsn8 -lgslavl8 -lnls8 -lplp8 \
-lwtc8 -lgslber_s8 -lnoname8 -lpls8 -lzx8 -lgsldb8 -lnro8 -lpsa8 -lgslr8 \
-lnsgr8 -lqsmashr

ORACLE_LIBS=$(ORACLE_HOME)/lib/ -L$(ORACLE_HOME)/rdbms/lib
$(ORACLE_HOME)/rdbms/lib/defopt.o
$(ORACLE_HOME)/lib/sscoreed.o $(ORACLE_HOME)/lib/nautab.o
$(ORACLE_HOME)/lib/naeet.o
$(ORACLE_HOME)/lib/naect.o $(ORACLE_HOME)/lib/naedhs.o $(ORACLE_L)
$(ORACLE_L)

oci_ oci_.c -I$(ORACLE_INCLUDES) -L$(ORACLE_LIBS) -DDCORACLE8

Buffer Buffer.c

 END of SETUP Script ##


This time the error is a little different:

Traceback (innermost last):
  File "DCOracle_test.py", line 1, in ?
import Buffer, oci_, sys
ImportError: ./oci_.so: undefined symbol: kpumfs


I tried the trick in the README - got a list of all symbols in the
Oracle libs and it turns out kpumfs is in four, all of which are
included in the setup file:

% grep kpumfs /var/tmp/oracle.symbols
libclient8.a[kpum.o]: kpumfs T 0140
libclntsh.so: kpumfs T 0018eb10
libclntsh.so.8.0: kpumfs T 0018eb10
libvppdc.so: kpumfs T 000e2a40

I'm at a bit of a loose end here...

Thanks again,

Erik Myllymaki


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