[Zope] re: trouble compiling DCOracle
--- 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 "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 > > > 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 )
Re: [Zope] Re: Zope digest, Vol 1 #1016 - 28 msgs (I will be out ofthe office Monday, October 16th) office Monday, October 16th)
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 )
Re: [Zope] Re: Zope digest, Vol 1 #1016 - 28 msgs (I will be out ofthe office Monday, October 16th) office Monday, October 16th)
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] trouble compiling DCOracle
> 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 "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 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] object properties
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 > which followed the "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) This will show all the properties of an object (zclass, folders, documents, etc). > If I used 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 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] object properties
Matt wrote: > > I tried a few things and found the following useful : > > Property ids of are > And of you want to actually see property values, you could try 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 )
[Zope] trouble compiling DCOracle
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
I tried a few things and found the following useful : Property ids of are 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 > > > > or if you want a reference, instead of a string > > > > 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. > > > > > > > > > > > > > > > > 'barfoo' in PropList or > 'guesswho' in PropList"> > > Success > > > > 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] Help Debugging External Methods
[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] date comparison
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
Matt writes: > > > > > 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: 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
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 which followed the . If I used 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 > > > > or if you want a reference, instead of a string > > > > 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. > > > > > > > > > > > > > > > > 'barfoo' in PropList or > 'guesswho' in PropList"> > > Success > > > > 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] Re: Zope digest, Vol 1 #1016 - 28 msgs (I will be out of theoffice Monday, October 16th)office Monday, October 16th)
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] We would like to include your software
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
Re: [Zope] object properties
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 or if you want a reference, instead of a string 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. Success 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] dtml-tree does weird things
Hi, I have the following in a dtmlDocument. 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. 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] ZCatalog question. boolean and wildcards.
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_'. 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] object properties
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 )