[Zope-dev] Zope Tests: 7 OK
Summary of messages to the zope-tests list. Period Sun Feb 25 12:00:00 2007 UTC to Mon Feb 26 12:00:00 2007 UTC. There were 7 messages: 7 from Zope Unit Tests. Tests passed OK --- Subject: OK : Zope-2.6 Python-2.1.3 : Linux From: Zope Unit Tests Date: Sun Feb 25 21:09:49 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007335.html Subject: OK : Zope-2.6 Python-2.3.6 : Linux From: Zope Unit Tests Date: Sun Feb 25 21:11:19 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007336.html Subject: OK : Zope-2.7 Python-2.3.6 : Linux From: Zope Unit Tests Date: Sun Feb 25 21:12:49 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007337.html Subject: OK : Zope-2.8 Python-2.3.6 : Linux From: Zope Unit Tests Date: Sun Feb 25 21:14:19 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007338.html Subject: OK : Zope-2.9 Python-2.4.4 : Linux From: Zope Unit Tests Date: Sun Feb 25 21:15:49 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007339.html Subject: OK : Zope-2.10 Python-2.4.4 : Linux From: Zope Unit Tests Date: Sun Feb 25 21:17:20 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007340.html Subject: OK : Zope-trunk Python-2.4.4 : Linux From: Zope Unit Tests Date: Sun Feb 25 21:18:50 EST 2007 URL: http://mail.zope.org/pipermail/zope-tests/2007-February/007341.html ___ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope] Zope hangs in FreeBSD with plenty of memory and CPU resources
Hmmm...unfortunately, that's not the cause of the problem (I'm responding since I'm on the East coast, Jean is on the West, and he's asleep right now): [EMAIL PROTECTED]: ~$ python Python 2.4.3 (#2, Jul 2 2006, 16:14:54) [GCC 3.4.2 [FreeBSD] 20040728] on freebsd5 Type help, copyright, credits or license for more information. import sys sys.getrecursionlimit() 1000 Though I do appreciate you forwarding that URL along, because a *lot* of people have suggested the Python stack issue, and until now, we've been unable to definitively rule that out. It's almost as good to clear one problem as the potential cause as it is to fix things. :-) Alex Kirk http://plone.org/documentation/faq/plone-on-bsd-python-stack Stefan On 26. Feb 2007, at 06:06, Jean Lagarde wrote: All, As a coincidence, that hang of Zope I mentioned in a message I posted yesterday has happened again today (second time), after a planned reboot. So here is a completely different issue from the memory one we've been discussing today. -- Anything that, in happening, causes something else to happen, causes something else to happen. --Douglas Adams ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] How can I import this module in python script ?????
Hi, I am playing around trying to make something happen on a workflow state change. Beacause I cannot import the module I need in the python script I am getting an error: global name 'getMemberById' is not defined how can I import this module or better still code this so I am not importing anything at all (i imagine the restrictions on importing modules was done for a reason). #import the module we need from Products.CMFCore.utils import getToolByName # Get the content object we're publishing review_state.object # How can I import this module? #from Products.CMFDefault.MembershipTool import MembershipTool mt = getToolByName(context, 'portal_membership') listed_ids = mt.getRoster() contentObject = review_state # Start with an empty list, ready to be filled with the addressed # of people we're dispatching to mailList=[] mailhost = context.MailHost mailhost = getattr(context, 'MailHost', None) # Iterate through all the site's users # context.portal_membership.listMembers(): for id in listed_ids: member = getMemberById(id) email = member.getProperty('email') # add them to the list of people we're emailing mailList.append(email) mMsg = 'Crop notification sent' mTo = email # and send it mailhost.send(mMsg, mTo, '[EMAIL PROTECTED]', 'New Crops available') # The change in indentation signals the end of the loop, so we've # now sent all the emails. Let's now send a confirmation that we've done it. # We'll be building the email as a string again, but we have to convert our # list data elements into a string before we can append the information recipients = string.join(mailList) mMsg = 'These people were sent e-mails' #mMsg += contentObject.absolute_url() + mMsg += recipients mailhost.send(mMsg, '[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'Lizard Leaves Announcement email confirmation') thx []'s Ian F U cn rd dis U mst uz Linux. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How can I import this module in python script ?????
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 getMemberById is a method on the portal_membership tool. You grab the tool and call the method: mt = getToolByName(context, 'portal_membership') member = mt.getMemberById(id) I highly suggest you get more familiar with Python in general. Importing a module to somehow make a method on an instance available makes no sense whatsoever. jens On 26 Feb 2007, at 15:13, [EMAIL PROTECTED] wrote: Hi, I am playing around trying to make something happen on a workflow state change. Beacause I cannot import the module I need in the python script I am getting an error: global name 'getMemberById' is not defined how can I import this module or better still code this so I am not importing anything at all (i imagine the restrictions on importing modules was done for a reason). #import the module we need from Products.CMFCore.utils import getToolByName # Get the content object we're publishing review_state.object # How can I import this module? #from Products.CMFDefault.MembershipTool import MembershipTool mt = getToolByName(context, 'portal_membership') listed_ids = mt.getRoster() contentObject = review_state # Start with an empty list, ready to be filled with the addressed # of people we're dispatching to mailList=[] mailhost = context.MailHost mailhost = getattr(context, 'MailHost', None) # Iterate through all the site's users # context.portal_membership.listMembers(): for id in listed_ids: member = getMemberById(id) email = member.getProperty('email') # add them to the list of people we're emailing mailList.append(email) mMsg = 'Crop notification sent' mTo = email # and send it mailhost.send(mMsg, mTo, '[EMAIL PROTECTED]', 'New Crops available') # The change in indentation signals the end of the loop, so we've # now sent all the emails. Let's now send a confirmation that we've done it. # We'll be building the email as a string again, but we have to convert our # list data elements into a string before we can append the information recipients = string.join(mailList) mMsg = 'These people were sent e-mails' #mMsg += contentObject.absolute_url() + mMsg += recipients mailhost.send(mMsg, '[EMAIL PROTECTED]', '[EMAIL PROTECTED]', 'Lizard Leaves Announcement email confirmation') thx []'s Ian F U cn rd dis U mst uz Linux. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Darwin) iD8DBQFF4vBARAx5nvEhZLIRAlqVAJ9uXfrE6ktRgS2rCOEqhqIPzvWQZACfYge6 ix/M5/TI5w1DyOXu+XTB604= =eV1e -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: How can I import this module in python script ?????
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: This issue is more on-topic for the '[EMAIL PROTECTED]' list. I am playing around trying to make something happen on a workflow state change. Beacause I cannot import the module I need in the python script I am getting an error: global name 'getMemberById' is not defined how can I import this module or better still code this so I am not importing anything at all (i imagine the restrictions on importing modules was done for a reason). Yes, but that's a decoy here: you don't really need to import a module; you just need to get an *instance* which happens to have its class defined in that module. In fact, you already *have* got hold of that instance (see below). The reason imports are restricted in untrusted code is that the standard library includes modules whose APIs are dangerous (e.g., imaging 'shutils.rmtree'). So, in order to use a filesystem module in TTW code, you must first make a declaration in Zope filesystem code which enables it. #import the module we need from Products.CMFCore.utils import getToolByName # Get the content object we're publishing review_state.object # How can I import this module? #from Products.CMFDefault.MembershipTool import MembershipTool mt = getToolByName(context, 'portal_membership') listed_ids = mt.getRoster() contentObject = review_state # Start with an empty list, ready to be filled with the addressed # of people we're dispatching to mailList=[] mailhost = context.MailHost mailhost = getattr(context, 'MailHost', None) # Iterate through all the site's users # context.portal_membership.listMembers(): for id in listed_ids: member = getMemberById(id) member = mt.getMemberById(id) # use the tool email = member.getProperty('email') # add them to the list of people we're emailing mailList.append(email) mMsg = 'Crop notification sent' mTo = email # and send it mailhost.send(mMsg, mTo, '[EMAIL PROTECTED]', 'New Crops available') # The change in indentation signals the end of the loop, so we've # now sent all the emails. Let's now send a confirmation that we've done it. # We'll be building the email as a string again, but we have to convert our # list data elements into a string before we can append the information recipients = string.join(mailList) Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF4vGZ+gerLs4ltQ4RAk9TAKC65LdOamnCo9skSiBM+MZBpo7pZgCggCi5 hKOvEX/Q5QIBPeTXTlSVGuc= =d/V9 -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] zope unresponsive
I know that there is a switch between zeo and zope and probably a firewall too, but how do I prove this is the problem. This is on production server in a military installation. I have major problems getting any kind of trouble shooting support. First we don't get access, and second no kind of debugging is allowed. You couldn't imagine the paperwork and the three months it took for me to get deadlockdebugger installed. Thanks, Paul ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: zope unresponsive
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul Williams wrote: I know that there is a switch between zeo and zope and probably a firewall too, but how do I prove this is the problem. This is on production server in a military installation. I have major problems getting any kind of trouble shooting support. First we don't get access, and second no kind of debugging is allowed. You couldn't imagine the paperwork and the three months it took for me to get deadlockdebugger installed. Create a parallel testing environment (in fact, any place that locked down should already have one), and try tweaking the firewall settings in that environment; another possibility is to have the appserver serve only from its cache for a long time (e.g., while repeatedly serving the same page), and then request a page (e.g., search, or something) which needs objects not already in cache. Once you can provoke the problem at will in the test environment, *then* you can begin tweaking the firewall to keep it from closing the socket between the appserver and the storage server (if that is your problem). Once you can prevent that in test, *then* you can push to have that change rolled to production. Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF4vf0+gerLs4ltQ4RAtkfAKC/26t0L1Vy5QUFAIq0AnLmW20VoACfctL7 tFdYS/fLPBQMaw6/OA+j6zY= =qLaq -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Moodle and Zope SSO.
Thanks to both, finally I implemented a very easy solution similar to the one proposed by Dieter, although i hope to convince my boss about the CAS solution. JL. Maciej Wisniowski wrote: I'm trying to implement a script like the one shown below but it seems too tricky and it does not work. Has anybody implemented this kind of sso with zope and moodle or whatever? We're using Zope and PHP apps with SSO build with use of CAS. Works good. For zope you'll find CAS4PAS authentication plugin for PHP I don't remember how it is called. CAS itself is java based application. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope hangs in FreeBSD with plenty of memory and CPU resources
My understanding is that get/setrecursionlimit is for the python internal limit and is not an indicator of the THREAD_STACK_SIZE value, but in any case, yes, we have compiled with that option and I don't think that these would be the symptoms I would see for a stack size issue anyway, but thanks for the suggestion! -- Jean On 2/26/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hmmm...unfortunately, that's not the cause of the problem (I'm responding since I'm on the East coast, Jean is on the West, and he's asleep right now): [EMAIL PROTECTED]: ~$ python Python 2.4.3 (#2, Jul 2 2006, 16:14:54) [GCC 3.4.2 [FreeBSD] 20040728] on freebsd5 Type help, copyright, credits or license for more information. import sys sys.getrecursionlimit() 1000 Though I do appreciate you forwarding that URL along, because a *lot* of people have suggested the Python stack issue, and until now, we've been unable to definitively rule that out. It's almost as good to clear one problem as the potential cause as it is to fix things. :-) Alex Kirk http://plone.org/documentation/faq/plone-on-bsd-python-stack Stefan On 26. Feb 2007, at 06:06, Jean Lagarde wrote: All, As a coincidence, that hang of Zope I mentioned in a message I posted yesterday has happened again today (second time), after a planned reboot. So here is a completely different issue from the memory one we've been discussing today. -- Anything that, in happening, causes something else to happen, causes something else to happen. --Douglas Adams ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Dynamic class from python script (?)
Dear Zopistas, i have an old zope application that present data from a database in such a manner dtml-in sql_methods.select_user() dtml-var firstnamedtml-var lastname /dtml-in I had to change the methods that returned data from the database, and it is no longer possible to return data directly from zsql methods. Instead i read them in a script, perform some processing and return a dictionary with exactly the same mappings. I thought the application would work without any change but it seems this is not the case (variables in dtml-in can not be found, kinda makes sense now, the dictionary values are not properties...). So i created class that dynamically contain all data returned from my script. The class is something like this class foo: dct ={} def fill(self,temp_dct): self.dct = temp_dct def __getattr__(self,val): return self.dct[cal] From pure python it works fine. Unfortunately i can not use it in a zope python script because of the __getattr__ method, so i put the class definition in an external method and use it in the python script (it returns an instance of the class). But dtml still returns me some strange errors. First, when the instance is created/accessed, some zope-like methods are called on it (for example getId, cant figure out why), and even if i implement them (dummy) it returns me authorization errors. Any idea, or alternative solution would be more than helpful ;) My main objective is not to change the zope application Thank you PS sorry for the length of my mail, but it is kinda complicated problem :) -- Dimitris Koukis Software Engineer [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: Dynamic class from python script (?)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dimitris Koukis wrote: Dear Zopistas, i have an old zope application that present data from a database in such a manner dtml-in sql_methods.select_user() dtml-var firstnamedtml-var lastname /dtml-in I had to change the methods that returned data from the database, and it is no longer possible to return data directly from zsql methods. Instead i read them in a script, perform some processing and return a dictionary with exactly the same mappings. I thought the application would work without any change but it seems this is not the case (variables in dtml-in can not be found, kinda makes sense now, the dictionary values are not properties...). Try the 'mapping' parameter for 'dtml-in':: dtml-in name=your_python_script mapping dmtl-var name=firstnamedtml-var name=lastname /dtml-in Tres. - -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF42Y8+gerLs4ltQ4RAiw3AKDLy3Sl4txFSc44BPQD/4DLKl1FTQCfWe7u EW84MPaI7lMzV5rOajsPtrI= =4fDO -END PGP SIGNATURE- ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: Dynamic class from python script (?)
Tres, thank you very much for your quick reply. Indeed it works with the mapping parameter, but the application has a large number of files and i was hoping that i wouldn't have to change them all ;) On the other hand it is a simple change, i can do that with a script if there is no there solution. Thanx again for your help :) Tres Seaver wrote: Dimitris Koukis wrote: Dear Zopistas, i have an old zope application that present data from a database in such a manner dtml-in sql_methods.select_user() dtml-var firstnamedtml-var lastname /dtml-in I had to change the methods that returned data from the database, and it is no longer possible to return data directly from zsql methods. Instead i read them in a script, perform some processing and return a dictionary with exactly the same mappings. I thought the application would work without any change but it seems this is not the case (variables in dtml-in can not be found, kinda makes sense now, the dictionary values are not properties...). Try the 'mapping' parameter for 'dtml-in':: dtml-in name=your_python_script mapping dmtl-var name=firstnamedtml-var name=lastname /dtml-in Tres. -- === Tres Seaver +1 540-429-0999 [EMAIL PROTECTED] Palladion Software Excellence by Designhttp://palladion.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Dimitris Koukis Software Engineer [EMAIL PROTECTED] ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Re: zope.testbrowser, how to?
Basil Shubin wrote: Hi friends, I want use zope.testbrowser for testing my sites, but before write it as DocTest I want execute each statemnt interactively in python shell. I don't know any way to see where it's works, what value it returns, what error I can get and how this error should looks is python... It's why I want check it in python shell. What the problem? First, if execute following code in python shell: from zope.testbrowser import Browser browser = Browser() browser.open('http://localhost/Plone') I have got: Traceback (most recent call last): File stdin, line 1, in ? File /usr/lib/python2.4/site-packages/zope/testbrowser/browser.py, line 220, in open self.mech_browser.open(url, data) File /usr/lib/python2.4/site-packages/mechanize/_mechanize.py, line 254, in open return self._mech_open(url, data) File /usr/lib/python2.4/site-packages/mechanize/_mechanize.py, line 277, in _mech_open self._response = UserAgent.open(self, self.request, data) File /usr/lib/python2.4/urllib2.py, line 358, in open response = self._open(req, data) File /usr/lib/python2.4/urllib2.py, line 376, in _open '_open', req) File /usr/lib/python2.4/urllib2.py, line 337, in _call_chain result = func(*args) File /usr/lib/python2.4/site-packages/zope/testbrowser/testing.py, line 112, in http_open return self.do_open(PublisherConnection, req) File /usr/lib/python2.4/urllib2.py, line 993, in do_open h.request(req.get_method(), req.get_selector(), req.data, headers) File /usr/lib/python2.4/site-packages/zope/testbrowser/testing.py, line 69, in request self.response = self.caller(request_string, handle_errors) File /usr/lib/python2.4/site-packages/zope/app/testing/functional.py, line 573, in __call__ environment) File /usr/lib/python2.4/site-packages/zope/app/testing/functional.py, line 606, in chooseRequestClass return chooseClasses(method, environment) File /usr/lib/python2.4/site-packages/zope/app/publication/httpfactory.py, line 33, in chooseClasses factory = factoryRegistry.lookup(method, content_type, environment) File /usr/lib/python2.4/site-packages/zope/app/publication/requestpublicationregistry.py, line 97, in lookup raise ConfigurationError('No registered publisher found ' zope.configuration.exceptions.ConfigurationError: No registered publisher found for (GET/) Second, if I add Zope src dir into PYTHONPATH, than I got following: from zope.testbrowser import Browser Running tests at level 1 Total: 0 tests, 0 failures, 0 errors and than it drops me out from python shell. So, question is: suppose I don't know what value/error I can/should recive after each statement, so how can I write DocTest? I need somehow to know to what I should expect, but how? So is there any solution? Can anybody give me any guidlines about what is correct way to write functional test and test this test. Yes, I have read docs about testing Plone, but above problems still remain unsolved for me... And how I can predict what should happens after each statement...? Thanks! ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to export ZWiki contents in ZODB to MYSQL
Win Myint Aung schrieb: Dear Members, I am a newbie in Zope. please do me a favor. I am looking for some python scripts that can export Zwiki contents from ZODB to MYSQL. Well, the script is easy in principle but you need to know how the result in your MySQL should look like. So its basically just traversing the object tree in zope, lookup the properties and attributes with content and then rewrite them in the form your application needs it. Otoh, its a lot of work - what is the expected gain? Regards T. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] How to export ZWiki contents in ZODB to MYSQL
Dear Tino, Thank you for your reply. Another big problem is I don't know how to start the python script. I would like to request any body to help me. Any draft script may be a good start for me. Thanks. - Original Message From: Tino Wildenhain [EMAIL PROTECTED] To: Win Myint Aung [EMAIL PROTECTED] Cc: zope@zope.org Sent: Tuesday, February 27, 2007 1:12:39 PM Subject: Re: [Zope] How to export ZWiki contents in ZODB to MYSQL Win Myint Aung schrieb: Dear Members, I am a newbie in Zope. please do me a favor. I am looking for some python scripts that can export Zwiki contents from ZODB to MYSQL. Well, the script is easy in principle but you need to know how the result in your MySQL should look like. So its basically just traversing the object tree in zope, lookup the properties and attributes with content and then rewrite them in the form your application needs it. Otoh, its a lot of work - what is the expected gain? Regards T. We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Exporting portal member data to csv
When i run the external method in plone site, it shows errors. The error shows. Site Error An error was encountered while publishing this resource. Error Type: AttributeError Error Value: portal_memberdata The following is the codings used in external methon. # make heading row row = makeRow() row[0] = 'member_id' row[1] = 'password' writer.writerow(row) for member in self.portal_membership.listMembers(): # make row for each member full of blank values row = makeRow() member_id = member.getId() user = acl_users.getUser(name=member_id) password = user._getPassword() row[0] = member_id row[1] = password writer.writerow(row) request.RESPONSE.setHeader('Content-Type','application/csv') request.RESPONSE.setHeader('Content-Length',len(text.getvalue())) request.RESPONSE.setHeader('Content-Disposition','inline;filename=%smembers.csv' % time.strftime(%Y%m%d-%H%M%S-,time.localtime())) return text.getvalue() No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )