[Zope-dev] Zope 2.2.4 Dying
Hi, since the last time i had some problems with my zope server. The zope 2.2.4 running under linux dies unexpectly with the following messages. 2001-02-16T01:50:08 ERROR(200) zdaemon zdaemon: Fri Feb 16 02:50:08 2001: Aiieee! 5451 exited with error code: 13 -- 2001-02-16T02:29:38 ERROR(200) zdaemon zdaemon: Fri Feb 16 03:29:38 2001: Aiieee! 10313 exited with error code: 13 What does the error code 13 say and could anyone help me to solve the problem as ___ 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] 2gb ZODB size limit
> "MWP" == Morten W Petersen <[EMAIL PROTECTED]> writes: MWP> BTW, there is a list called [EMAIL PROTECTED], for ZODB MWP> specific questions. Make that [EMAIL PROTECTED] now! -Barry ___ 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] 2gb ZODB size limit
On 15 Feb 2001 23:28:18 +0100, Morten W. Petersen wrote: > [Tim McLaughlin] > > | Is this true on windows too? I saw some mention of this limit be lifted, > | but if so, in what version? > > It's not a problem on Windows, AFAIK. It's a problem with Linux, if > you want to be able to use databases > 2GB in size on Linux, a > kernel >= 2.4.0 is required. ... or , on Redhat, an 'enterprise' kernel, as it has LFS built into it. For otehrs, you can get the patch, and use it on 2.2 kernels 9check the version number of the patch to teh kernel, of course, standard kernel disclaimer applies). Bill ___ 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] Problem upgrading to Zope2.3
I did a clean install (on w2k), then copied across my products and Data.fs etc and when I restarted I got the following when I tried to access manage_main on the root folder. Funny thing is this doesn't happen on any other folder. Error type: SystemError Error value: Failed to import class Guard from module Products.PythonMethod.zbytecodehacks.VSExec Traceback (innermost last): File D:\Zope\AUSLAB~1\lib\python\ZPublisher\Publish.py, line 222, in publish_module File D:\Zope\AUSLAB~1\lib\python\ZPublisher\Publish.py, line 187, in publish File D:\Zope\AUSLAB~1\lib\python\Zope\__init__.py, line 221, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File D:\Zope\AUSLAB~1\lib\python\ZPublisher\Publish.py, line 171, in publish File D:\Zope\AUSLAB~1\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_main) File D:\Zope\AUSLAB~1\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: manage_main) File D:\Zope\AUSLAB~1\lib\python\Shared\DC\Scripts\Bindings.py, line 324, in __call__ (Object: manage_main) File D:\Zope\AUSLAB~1\lib\python\Shared\DC\Scripts\Bindings.py, line 353, in _bindAndExec (Object: manage_main) File D:\Zope\AUSLAB~1\lib\python\App\special_dtml.py, line 236, in _exec (Object: manage_main) File D:\Zope\AUSLAB~1\lib\python\DocumentTemplate\DT_In.py, line 664, in renderwob (Object: objectItems) File D:\Zope\AUSLAB~1\lib\python\DocumentTemplate\DT_In.py, line 759, in sort_sequence (Object: objectItems) File D:\Zope\AUSLAB~1\lib\python\ZODB\Connection.py, line 496, in setstate SystemError: (see above) I don't even have any PythonMethods in my base directory. Why is that something obscure as this could trip up the whole management interface? ___ 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] Import Libraries into Python Script
What's wrong with: import imaplib imaplib.__allow_access_to_unprotected_subobjects__ = 1 And, if the above is somehow bad or insecure, how would you use your method to allow access to specific methods in a module, as in: import re re.__allow_access_to_unprotected_subobjects__ = { 'sub': 1, } Itai Brian Lloyd wrote: >This needs to be documented (and made a little easier), but >heres a quick primer: > > > o Create a new directory in your 'Products' directory > (called ModuleAssertions or something like that - the > name is unimportant). > > o Create an '__init__.py' file in the new directory. > > o Add module assertions like the example below to __init__.py: > ># Site-wide module security assertions > >from AccessControl.SecurityInfo import ModuleSecurityInfo >import string > >def allow_module(module_name): > module = __import__(module_name) > sec_info=ModuleSecurityInfo(module) > sec_info.setDefaultAccess(1) > sec_info.apply(module.__dict__) > for part in string.split(module_name, '.')[1:]: > module=getattr(module, part) > sec_info=ModuleSecurityInfo(module) > sec_info.setDefaultAccess(1) > sec_info.apply(module.__dict__) > > ># Allow access to base64 module >allow_module('base64') > ># Allow access to imaplib >allow_module('imaplib') > > > o Restart Zope > > > > > >Brian Lloyd[EMAIL PROTECTED] >Software Engineer 540.371.6909 >Digital Creations www.digicool.com > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf >> Of Chris Withers >> Sent: Thursday, February 15, 2001 6:49 AM >> To: [EMAIL PROTECTED] >> Subject: [Zope-dev] Import Libraries into Python Script >> >> >> Hi, >> >> What's the 'approved' way of validating standard python modules >> so they can be >> imported in Python Scripts? >> >> I want to import imaplib but can't find out how :-( >> >> cheers, >> > > Chris -- -- Itai Tavor -- "Je sautille, donc je suis."-- [EMAIL PROTECTED]-- - Kermit the Frog -- -- "What he needs now is understanding... and a confederate victory" -- -- Dr. Jacobi, Twin Peaks -- ___ 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] 2gb ZODB size limit
> FileStorage type database was implicit, as we're discussing ZODB, > and that's one file per database. Not necessarily ;-) http://www.zope.org/Members/hathawsh/PartitionedFileStorage ...thanks Shane! *grinz* Chris ___ 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] 2gb ZODB size limit
[Erik Enge] | [Morten W. Petersen] | | | BTW, there is a list called [EMAIL PROTECTED], for ZODB specific | | questions. | | Actually, I think its called ZODB-Dev; [EMAIL PROTECTED] I stand corrected. Cheers, Morten ___ 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] 2gb ZODB size limit
[Morten W. Petersen] | BTW, there is a list called [EMAIL PROTECTED], for ZODB specific | questions. Actually, I think its called ZODB-Dev; [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] 2gb ZODB size limit
[Erik Enge] | [Morten W. Petersen] | | | It's a problem with Linux, if you want to be able to use databases > | | 2GB in size on Linux, a kernel >= 2.4.0 is required. | | Nope. First, the limit is at file-level, not database-level (mind | you, a problem with the filesystem, not Linux per se). You can have | tons and tons of files, but noone of those can be over 2GB. FileStorage type database was implicit, as we're discussing ZODB, and that's one file per database. | Secondly, this is only true for the ext2 (and «lesser» filesystems). | ReiserFS does not have this limitation and I've heard that is supposed | to be shipped «batteries included» come 2.4.1. Sorry? Didn't I say kernel version 2.4.0 or greater? The 2GB problem (in ext2) is fixed there you know. ..and a side note for ReiserFS, I've had it mess up a filesystem completely, so much for 1 second recovery after a crash. ;-) BTW, there is a list called [EMAIL PROTECTED], for ZODB specific questions. Cheers, Morten ___ 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] ANNOUNCE: Zope 2.3.1 beta 1 released...
Hello all, Zope 2.3.1 beta 1 has been released - you can download it from Zope.org: http://www.zope.org/Products/Zope/2.3.1b1/ Zope 2.3.1b1 fixes a number of issues that have come up through usage of 2.3.0, as well as some previously reported issues from the Zope bug collector. For more information on what is new in this release, see the CHANGES.txt and HISTORY.txt files for the release: http://www.zope.org/Products/Zope/2.3.1b1/CHANGES.txt http://www.zope.org/Products/Zope/2.3.1b1/HISTORY.txt Note that we have also posted "diff" updates as .tgz files that will let you easily upgrade an existing 2.3.x site. These updates are available for those currently using the 2.3.x source release or the 2.3.x binary releases. To apply a differential update to your site: - download the appropriate .tgz file from zope.org - shutdown your Zope process - copy the .tgz to your Zope directory and extract it - run w_pcgi or wo_pcgi *if you are not using a binary release* - restart your process Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.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] How to read ZODB with Python script?
http://www.kuchling.com/zodb/guide/ -Michel On 15 Feb 2001, Petr Knapek wrote: > Hi Zopists, > > I would like to know how to connect to running Zope ZODB from a python > script. I would like to have possibility to read only objects from > ZODB? Is there any possibility how to do it when Zope application > server is running and not to corrupt the ZODB? > > > Thanks, > Petr > > > ___ 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] 2gb ZODB size limit
[Morten W. Petersen] | It's a problem with Linux, if you want to be able to use databases > | 2GB in size on Linux, a kernel >= 2.4.0 is required. Nope. First, the limit is at file-level, not database-level (mind you, a problem with the filesystem, not Linux per se). You can have tons and tons of files, but noone of those can be over 2GB. Secondly, this is only true for the ext2 (and «lesser» filesystems). ReiserFS does not have this limitation and I've heard that is supposed to be shipped «batteries included» come 2.4.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] Calling Catalog from python script
[[EMAIL PROTECTED]] | Where did getobject come from? I know about Catalog.data, but I've never | seen a getobject() method... It's a method of the brain ;). If you have a data_record_id, you can use getobject() to retrieve the object it represents. ___ 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] 2gb ZODB size limit
Windows, according to Trent Mick a Developer here at ActiveState who added in some large file support for Python platforms for python 2.0 (and has looked at this in detail). I heard a rumour Solaris does not have this problem. -- Andy McKay. - Original Message - From: "Morten W. Petersen" <[EMAIL PROTECTED]> To: "Andy McKay" <[EMAIL PROTECTED]> Cc: "Tim McLaughlin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, February 15, 2001 2:30 PM Subject: Re: [Zope-dev] 2gb ZODB size limit > [Andy McKay] > > | Yes, you will hit this limit. Windows uses a 32 bit integer for file size... > | No matter what MS says, Ive hit it on Win2k. > > Interesting. Are you sure the problem lies with Win2K and not Python or > something else? > > Cheers, > > Morten > > ___ > 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 )
Re: [Zope-dev] 2gb ZODB size limit
[Andy McKay] | Yes, you will hit this limit. Windows uses a 32 bit integer for file size... | No matter what MS says, Ive hit it on Win2k. Interesting. Are you sure the problem lies with Win2K and not Python or something else? Cheers, Morten ___ 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] 2gb ZODB size limit
[Tim McLaughlin] | Is this true on windows too? I saw some mention of this limit be lifted, | but if so, in what version? It's not a problem on Windows, AFAIK. It's a problem with Linux, if you want to be able to use databases > 2GB in size on Linux, a kernel >= 2.4.0 is required. Hope this helps, Morten ___ 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] 2gb ZODB size limit
Yes, you will hit this limit. Windows uses a 32 bit integer for file size... No matter what MS says, Ive hit it on Win2k. -- Andy McKay. - Original Message - From: "Tim McLaughlin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 15, 2001 1:13 PM Subject: [Zope-dev] 2gb ZODB size limit > Is this true on windows too? I saw some mention of this limit be lifted, > but if so, in what version? > > ___ > 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] 2gb ZODB size limit
Is this true on windows too? I saw some mention of this limit be lifted, but if so, in what version? ___ 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] DA for DB2 ?
I have looked around for a DB2 database adapter for Zope and did not find any. But I have found that there exists a DB2 driver for Python under: ftp://people.linuxkorea.co.kr/pub/DB2 This driver claims to be Python DB API compliant, so it should be possible to port for example the ZOracleDA. But before I invent the wheel for a second time I ask you: 0. Has anybody written or started to write a DB2 adapter for Zope? 1. Has anybody experiences with this python driver for DB2? 2. Or am I wrong with my assumption and it is early impossible to write a DB2 adapter. 3. Is anybody else interested in DB2 support for Zope? thanks in advance Philipp Auersperg ___ 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] Getting the parent of a container in a Python Script
Erik, >What do you need the reference for? How are you going to use it? And >when you're talking about «inside ZODB», does that mean that you're >not using Zope to access it? I'm using Zope but I made up my application by components. So I want to access an object anywhere in the database even if it's not in the URL path. Anyway, it's not a big problem for now. >Shouldn't be a problem. Also have a look at objectValues(), >objectIds() and objectItems() in lib/python/OFS/ObjectManager.py; >around line 320. They could save you some time. I'll take a look at it. Cyril ___ 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] How to read ZODB with Python script?
Steve Alexander wrote: > > Petr Knapek wrote: > > > > > I would like to know how to connect to running Zope ZODB from > > a python script. I would like to have possibility to read > > only objects from ZODB? Is there any possibility how to do > > it when Zope application server is running and not to corrupt > > the ZODB? > > This was asked on the [EMAIL PROTECTED] list only a few weeks ago. You > can look up the discussion in the list archives. > > The best solution is for you to use ZEO, and write your python > object-reader as a ZEO Storage Client. > > I believe this is easier than it might sound, although I haven't tried > it myself. > > (did I get the terminology right?) Yep, and it's actually *really* easy. Once you have your Zope running on ZEO, you just write a script with these two lines: import Zope app = Zope.app() Now "app" refers to the root folder. Read and change objects to your heart's content. (Seriously!) Then just call: get_transaction().commit() It can't get any easier than that. You can even do all this using the interactive prompt. Shane ___ 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] How to read ZODB with Python script?
Petr Knapek wrote: > > I would like to know how to connect to running Zope ZODB from > a python script. I would like to have possibility to read > only objects from ZODB? Is there any possibility how to do > it when Zope application server is running and not to corrupt > the ZODB? This was asked on the [EMAIL PROTECTED] list only a few weeks ago. You can look up the discussion in the list archives. The best solution is for you to use ZEO, and write your python object-reader as a ZEO Storage Client. I believe this is easier than it might sound, although I haven't tried it myself. (did I get the terminology right?) -- Steve Alexander Software Engineer cat-Box limited http://www.cat-box.net ___ 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] How to read ZODB with Python script?
Hi Petr, Look into ZEO. You'll be able to connect to a ZODB database from multiple processes with ZEO. - C - Original Message - From: "Petr Knapek" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 15, 2001 11:34 AM Subject: [Zope-dev] How to read ZODB with Python script? Hi Zopists, I would like to know how to connect to running Zope ZODB from a python script. I would like to have possibility to read only objects from ZODB? Is there any possibility how to do it when Zope application server is running and not to corrupt the ZODB? Thanks, Petr -- Petr Knápek NEXTRA Czech Republic, s.r.o., Hlinky 114, 603 00 Brno, Czech Republic e-mail: mailto:[EMAIL PROTECTED] tel:+420-5-43 554 150 FAX:+420-5-43 554 214 ___ 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] How to read ZODB with Python script?
Hi Zopists, I would like to know how to connect to running Zope ZODB from a python script. I would like to have possibility to read only objects from ZODB? Is there any possibility how to do it when Zope application server is running and not to corrupt the ZODB? Thanks, Petr -- Petr Knápek NEXTRA Czech Republic, s.r.o., Hlinky 114, 603 00 Brno, Czech Republic e-mail: mailto:[EMAIL PROTECTED] tel:+420-5-43 554 150 FAX:+420-5-43 554 214 ___ 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] Getting the parent of a container in a Python Script
[Cyril Elkaim] | I want to give the id (eventually qualified) of an object and get a | reference to it. I'm talking about persistent objects inside the | ZODB. What do you need the reference for? How are you going to use it? And when you're talking about «inside ZODB», does that mean that you're not using Zope to access it? | For example it should be interesting to walk through the database | using only DOM methods. Is that the case? Shouldn't be a problem. Also have a look at objectValues(), objectIds() and objectItems() in lib/python/OFS/ObjectManager.py; around line 320. They could save you some time. ___ 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] Getting the parent of a container in a Python Script
Eric, Thanks that works :-) And you know what I've tried that before posting but inside the test tab of my zclass. I should tried it inside the client Folder. Anyway that's OK. >I'm not quite sure what you mean, could you elaborate please? Do you >mean like you want to search for any object and get a reference >(kewords: ZCatalog, getobject and searchResults) or just to have a >HTML link (keywords: relative_url and absolute_url) or what? :) I want to give the id (eventually qualified) of an object and get a reference to it. I'm talking about persistent objects inside the ZODB. A question is the ZODB using the DOM? Because getparentNode() is a DOM method. For example it should be interesting to walk through the database using only DOM methods. Is that the case ? with them I can anywhere I want. I'm using Mozilla exclusivley and all my Javascript code use the DOM so I will be 'at home'. Maybe all that questions already answered, sorry if that's the case. Thanks, Cyril ___ 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] Getting the parent of a container in a Python Script
Do you mean the aq_parent? I believe that is the property that you want. Cyril Elkaim wrote: >Hi all, > > My question is in the title. I think I'm stupid because I have really searched > anywhere, and found nothing. The answer is certainly trivial but too many hours > you know... :-) > > I'm able to get all the children of the current container or context but unable > to get its parent. Maybe it's silly but a 'parent' property for all the > objects seems to me a good idea. Of such a property may already exist but what is > its name ? > > Of course I have tried REQUEST.PARENTS[0] but this is the parent inside the > URL, I'm searching the PARENT inside the object system. > > Another question how can I get a reference of any object in OBJECT system, > I've tried unrestrictedTraverse but it seems very 'restrictive' :-) > > Aside from my problems Zope rocks really. > > Thanks in advance > Cyril > > ___ > 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 )
Re: [Zope-dev] Getting the parent of a container in a Python Script
[Cyril Elkaim] | Of course I have tried REQUEST.PARENTS[0] but this is the parent | inside the URL, I'm searching the PARENT inside the object system. yourobject.getParentNode() should do the trick. Have a read at lib/python/OFS/ZDOM.py | Another question how can I get a reference of any object in OBJECT | system, I'm not quite sure what you mean, could you elaborate please? Do you mean like you want to search for any object and get a reference (kewords: ZCatalog, getobject and searchResults) or just to have a HTML link (keywords: relative_url and absolute_url) or what? :) ___ 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] Getting the parent of a container in a Python Script
[Cyril Elkaim] |Hi all, Hia Cyril, [snip] | Aside from my problems Zope rocks really. Yes it does. And you can find usable information in $ZOPE_INSTANCE/lib/python/OFS/ZDOM.py . Hope this helps, Morten ___ 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] Import Libraries into Python Script
This needs to be documented (and made a little easier), but heres a quick primer: o Create a new directory in your 'Products' directory (called ModuleAssertions or something like that - the name is unimportant). o Create an '__init__.py' file in the new directory. o Add module assertions like the example below to __init__.py: # Site-wide module security assertions from AccessControl.SecurityInfo import ModuleSecurityInfo import string def allow_module(module_name): module = __import__(module_name) sec_info=ModuleSecurityInfo(module) sec_info.setDefaultAccess(1) sec_info.apply(module.__dict__) for part in string.split(module_name, '.')[1:]: module=getattr(module, part) sec_info=ModuleSecurityInfo(module) sec_info.setDefaultAccess(1) sec_info.apply(module.__dict__) # Allow access to base64 module allow_module('base64') # Allow access to imaplib allow_module('imaplib') o Restart Zope Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations www.digicool.com > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf > Of Chris Withers > Sent: Thursday, February 15, 2001 6:49 AM > To: [EMAIL PROTECTED] > Subject: [Zope-dev] Import Libraries into Python Script > > > Hi, > > What's the 'approved' way of validating standard python modules > so they can be > imported in Python Scripts? > > I want to import imaplib but can't find out how :-( > > cheers, > > Chris > > ___ > 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] Getting the parent of a container in a Python Script
Hi all, My question is in the title. I think I'm stupid because I have really searched anywhere, and found nothing. The answer is certainly trivial but too many hours you know... :-) I'm able to get all the children of the current container or context but unable to get its parent. Maybe it's silly but a 'parent' property for all the objects seems to me a good idea. Of such a property may already exist but what is its name ? Of course I have tried REQUEST.PARENTS[0] but this is the parent inside the URL, I'm searching the PARENT inside the object system. Another question how can I get a reference of any object in OBJECT system, I've tried unrestrictedTraverse but it seems very 'restrictive' :-) Aside from my problems Zope rocks really. Thanks in advance Cyril ___ 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] Re: More Feedback on Refresh
Shane Hathaway wrote: > > Oh, here's a hypothesis... if, in __init__.py, you use "import" within > the initialize() method rather than at module scope, Refresh can't > detect the module dependency correctly. We're not using import in this way but are still seeing icon wierdities. Also, if you use a methods={} in __init__.py of your product, those methods aren't refreshed. HTH, Chris ___ 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] [Newbie Alert] How to make an existing class catalog-aware
[stefano ciccarelli] | Is there any way to make an existing class catalog aware? Is this ZClasses or Python classes, and are there any objects that exist already? ___ 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] [Newbie Alert] How to make an existing class catalog-aware
Hi everybody I am using managed meeting to set up a course management site. I would like to make its classes catalog aware, so I can make canned searches and display different kind of courses, depending on the user interest. Is there any way to make an existing class catalog aware? Thanks, Stefano ___ 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] Import Libraries into Python Script
Hi, What's the 'approved' way of validating standard python modules so they can be imported in Python Scripts? I want to import imaplib but can't find out how :-( cheers, Chris ___ 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 )