Re: [Zope] How best to copy and paste in pythonscript?
For what its worth, thanks AJ and others for the time you put into replying queries daily. I find often I don't have to ask because if someone hasn't already asked it someone else will soon ask. Not to mention, but I will, some of your responses (all of you) leaves me saying " I didn''t know you could do that" or "so that's how its done". Thanks, Thomas On Monday 28 August 2006 10:47, Andreas Jung wrote: > --On 28. August 2006 07:41:03 -0700 Dennis Allison > > <[EMAIL PROTECTED]> wrote: > > AJ -- > > > > You are, of course, correct. I wanted Gaute to take a look at the > > actual code and proceed from there. Docfinder is also a useful approach > > for learning about the system. > > > > Gaute -- > > > > If you are a frequent reader of this list, you know that AJ's style is to > > encourage posters to 1) be complete and precise in the questions they > > post and 2) provide just enough infomration for the poster to discover > > the answer to his/her post himself. This is an excellent pedagogical > > strategy but sometimes is frustrating. > > No, it's personal laziness to provide the food bite-size :-) > > Andreas -- Thomas McMillan Grant Bennett Appalachian State University Computer Consultant III P O Box 32026 University Library Boone, North Carolina 28608 (828) 262 6587 An important measure of effort in coding is the frequency with which you write something that doesn't actually match your mental representation of the problem, and have to backtrack on realizing that what you just typed won't actually tell the language to do what you're thinking. -Eric Raymond Library Systems Help Desk: http://linux.library.appstate.edu/help ___ 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 best to copy and paste in pythonscript?
On 8/28/06, Gaute Amundsen <[EMAIL PROTECTED]> wrote: But knowing you a bit by now, me thinks you are infact referring to the source.. Some API doc that! Correct. That is some API doc. In fact, you can't get any better than that, as it is always up to date, and to the point. :-) Yeah, I know, when you come from the land of compilers, it takes a bit of getting used to. But the fact is that it works very well. Actually, I am starting to think there should be a big notice on the frontpage of the http://www.zope.org/Documentation/ section saying: "don't bother with this, just read the source" Mmm. Yes. Sarcasm. That makes you look serious. ___ 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 best to copy and paste in pythonscript?
Gaute Amundsen wrote: Not to mention nurturing my growing desire to switch to ROR at the first oportunity, Please, just go... one less person who seems to be under the impression they've paid for some kind of support contract by joining this list won't be missed. Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ 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 best to copy and paste in pythonscript?
Andreas -- Take the compliment. Either way, you have been a great resource for me in the past and will, I hope, continue to be so in the future. On Mon, 28 Aug 2006, Andreas Jung wrote: > > > --On 28. August 2006 07:41:03 -0700 Dennis Allison > <[EMAIL PROTECTED]> wrote: > > > AJ -- > > > > You are, of course, correct. I wanted Gaute to take a look at the > > actual code and proceed from there. Docfinder is also a useful approach > > for learning about the system. > > > > Gaute -- > > > > If you are a frequent reader of this list, you know that AJ's style is to > > encourage posters to 1) be complete and precise in the questions they post > > and 2) provide just enough infomration for the poster to discover the > > answer to his/her post himself. This is an excellent pedagogical > > strategy but sometimes is frustrating. > > No, it's personal laziness to provide the food bite-size :-) > > Andreas -- ___ 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 best to copy and paste in pythonscript?
--On 28. August 2006 07:41:03 -0700 Dennis Allison <[EMAIL PROTECTED]> wrote: AJ -- You are, of course, correct. I wanted Gaute to take a look at the actual code and proceed from there. Docfinder is also a useful approach for learning about the system. Gaute -- If you are a frequent reader of this list, you know that AJ's style is to encourage posters to 1) be complete and precise in the questions they post and 2) provide just enough infomration for the poster to discover the answer to his/her post himself. This is an excellent pedagogical strategy but sometimes is frustrating. No, it's personal laziness to provide the food bite-size :-) Andreas pgpUrK9bzZjpL.pgp Description: 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] How best to copy and paste in pythonscript?
AJ -- You are, of course, correct. I wanted Gaute to take a look at the actual code and proceed from there. Docfinder is also a useful approach for learning about the system. Gaute -- If you are a frequent reader of this list, you know that AJ's style is to encourage posters to 1) be complete and precise in the questions they post and 2) provide just enough infomration for the poster to discover the answer to his/her post himself. This is an excellent pedagogical strategy but sometimes is frustrating. On Mon, 28 Aug 2006, Andreas Jung wrote: > > > --On 28. August 2006 07:24:40 -0700 Dennis Allison > <[EMAIL PROTECTED]> wrote: > > > > > Take a look at the actual code. Th API requires a that a clipboard > > object acquired from the copy be sent to the paste. > > > > > > > > This is not entirely true. If you look at the code you'll that you might > pass None as clipboard object and the method will try to get the value > from the REQUEST. But in this case you must pass in the REQUEST as keyword > parameter and not as positional argument. > > But back to the original discussion API vs. implementation..To quote Dieter: > Unlike the API documentation which describes how things should be, the > Docfinder documentation describes (at least partially) how they really are: > complete and precise :-) > > -aj -- ___ 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 best to copy and paste in pythonscript?
--On 28. August 2006 07:24:40 -0700 Dennis Allison <[EMAIL PROTECTED]> wrote: Take a look at the actual code. Th API requires a that a clipboard object acquired from the copy be sent to the paste. This is not entirely true. If you look at the code you'll that you might pass None as clipboard object and the method will try to get the value from the REQUEST. But in this case you must pass in the REQUEST as keyword parameter and not as positional argument. But back to the original discussion API vs. implementation..To quote Dieter: Unlike the API documentation which describes how things should be, the Docfinder documentation describes (at least partially) how they really are: complete and precise :-) -aj pgpTjw4XGgViW.pgp Description: 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] How best to copy and paste in pythonscript?
Take a look at the actual code. Th API requires a that a clipboard object acquired from the copy be sent to the paste. On Mon, 28 Aug 2006, Gaute Amundsen wrote: > > Hi. > > I am having some strange problems getting copy and paste to work propperly in > > python script > > Basically I do: > > parent.manage_copyObjects([currFold.id], REQUEST) > > in one script, and: > > dest_fold.manage_pasteObjects(REQUEST) > > in another > > I have tried a lot of variations, and read all that I could goolge about it, > but stil it won't work. > > Could somebody please tell me the "canonical" way of dooing this? > > Regards > > Gaute Amundsen > ___ > 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 )
Re: [Zope] How best to copy and paste in pythonscript?
--On 28. August 2006 14:38:23 +0200 Gaute Amundsen <[EMAIL PROTECTED]> wrote: On Monday 28 August 2006 14:06, Andreas Jung wrote: --On 28. August 2006 14:00:25 +0200 Gaute Amundsen <[EMAIL PROTECTED]> wrote: > On Monday 28 August 2006 13:16, Andreas Jung wrote: >> - Docfindertab >> - lib/python/OFS/interfaces.py (!) >> - lib/python/OFS/CopySupport.py >> >> -aj > > Excuse me, my oh so knowledgable friend, but it is not at all obious to > me, ( or most other readers of this list, I'd wager) what or where > "Docfindertab" is. You might google for Docfindertab and click on the first hit. I think that's a task you can perform on your own? I am not in the habit of installing products on our server just because some self important twat, who could not be bothered to write "try the Docfindertab product", mentions a name that might refer to that product. Now you have spent twise as much time typing the reply, as you would have if you had been clear from the start. Not to mention nurturing my growing desire to switch to ROR at the first oportunity, and demonstrating to potential zope users on the list that asking for help wil just get you insulted. You had a bad night? The pointer to the keyword argument and the hints where to look for additional information were perfectly fine. So what was insulting? This list is *not* a professional helpdesk. We answer to questions on a voluntary basis. Even as a newbie (if you are one) you should be able to perform additional investigations on your own. What's wrong with googling for "Docfindertab"? I think we don't have to perform such trivial tasks for you. You expected help for you problem - you got help and the right solution. But speaking for almost all other volunteers on this list: we do except that you do basic investigations on your own initiative. On my installaton there is no interfaces.py for OFS, nor for hardly anything else. It's available in the latest Zope 2.9 version. Since you did not provide an version information I could not smell what you're using so I looked into the most current version. Otherwise you can always look at the sources (that's why it is called open-source ; you have the freedom to look at the sources) and "grep -r" is always a perfect tool to find related code parts. -aj pgpqg909HqYEb.pgp Description: 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] How best to copy and paste in pythonscript?
On Monday 28 August 2006 14:06, Andreas Jung wrote: > --On 28. August 2006 14:00:25 +0200 Gaute Amundsen <[EMAIL PROTECTED]> wrote: > > On Monday 28 August 2006 13:16, Andreas Jung wrote: > >> - Docfindertab > >> - lib/python/OFS/interfaces.py (!) > >> - lib/python/OFS/CopySupport.py > >> > >> -aj > > > > Excuse me, my oh so knowledgable friend, but it is not at all obious to > > me, ( or most other readers of this list, I'd wager) what or where > > "Docfindertab" is. > > You might google for Docfindertab and click on the first hit. I think > that's a task you can perform on your own? > I am not in the habit of installing products on our server just because some self important twat, who could not be bothered to write "try the Docfindertab product", mentions a name that might refer to that product. Now you have spent twise as much time typing the reply, as you would have if you had been clear from the start. Not to mention nurturing my growing desire to switch to ROR at the first oportunity, and demonstrating to potential zope users on the list that asking for help wil just get you insulted. Nice. > > On the zope site perhaps, or maybe on _your_ os? > > ? > > > But knowing you a bit by now, me thinks you are infact referring to the > > source.. > > Some API doc that! > > > > Actually, I am starting to think there should be a big notice on the > > frontpage of the http://www.zope.org/Documentation/ section saying: > > > > "don't bother with this, just read the source" > > > > I am sure zopes momentum as a platform would improve greatly, > > and you would not have to bother answering such stupid questions. > > The documentation situation in Zope 2 land is as it is and it won't change > much. And as a Zope developer one should know that APIs are usually > documented in interface files (that's why I mentioned them > *before* the source code file). > > -aj On my installaton there is no interfaces.py for OFS, nor for hardly anything else. But never mind, you can spare me you nuggets of wisdom, they are not worth the bother. G. ___ 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 best to copy and paste in pythonscript?
--On 28. August 2006 14:00:25 +0200 Gaute Amundsen <[EMAIL PROTECTED]> wrote: On Monday 28 August 2006 13:16, Andreas Jung wrote: - Docfindertab - lib/python/OFS/interfaces.py (!) - lib/python/OFS/CopySupport.py -aj Excuse me, my oh so knowledgable friend, but it is not at all obious to me, ( or most other readers of this list, I'd wager) what or where "Docfindertab" is. You might google for Docfindertab and click on the first hit. I think that's a task you can perform on your own? On the zope site perhaps, or maybe on _your_ os? ? But knowing you a bit by now, me thinks you are infact referring to the source.. Some API doc that! Actually, I am starting to think there should be a big notice on the frontpage of the http://www.zope.org/Documentation/ section saying: "don't bother with this, just read the source" I am sure zopes momentum as a platform would improve greatly, and you would not have to bother answering such stupid questions. The documentation situation in Zope 2 land is as it is and it won't change much. And as a Zope developer one should know that APIs are usually documented in interface files (that's why I mentioned them *before* the source code file). -aj pgprA77BJrgXT.pgp Description: 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] How best to copy and paste in pythonscript?
On Monday 28 August 2006 13:16, Andreas Jung wrote: > - Docfindertab > - lib/python/OFS/interfaces.py (!) > - lib/python/OFS/CopySupport.py > > -aj Excuse me, my oh so knowledgable friend, but it is not at all obious to me, ( or most other readers of this list, I'd wager) what or where "Docfindertab" is. On the zope site perhaps, or maybe on _your_ os? But knowing you a bit by now, me thinks you are infact referring to the source.. Some API doc that! Actually, I am starting to think there should be a big notice on the frontpage of the http://www.zope.org/Documentation/ section saying: "don't bother with this, just read the source" I am sure zopes momentum as a platform would improve greatly, and you would not have to bother answering such stupid questions. G. ___ 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 best to copy and paste in pythonscript?
--On 28. August 2006 13:00:59 +0200 Gaute Amundsen <[EMAIL PROTECTED]> wrote: When you mention it, where exactly is the APIs? A search of the zope site for "manage_copyObjects" givs me two largely irrelevant hits. - Docfindertab - lib/python/OFS/interfaces.py (!) - lib/python/OFS/CopySupport.py -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: [EMAIL PROTECTED] - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting pgpE3WQSGwPcm.pgp Description: 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] How best to copy and paste in pythonscript?
On Monday 28 August 2006 12:21, Andreas Jung wrote: > --On 28. August 2006 12:08:16 +0200 Gaute Amundsen <[EMAIL PROTECTED]> wrote: > > Hi. > > > > I am having some strange problems getting copy and paste to work > > propperly in python script > > > > Basically I do: > > > > parent.manage_copyObjects([currFold.id], REQUEST) > > > > in one script, and: > > > > dest_fold.manage_pasteObjects(REQUEST) > > You must check the APIs carefully. manage_pasteObjects() > takes REQUEST as keyword parameter but not as positional > parameter. So you must pass is it as keyword parameter! > > -aj So you are saying that parent.manage_copyObjects([currFold.id], REQUEST) is ok. and dest_fold.manage_pasteObjects(REQUEST=context.REQUEST) should be ok? When you mention it, where exactly is the APIs? A search of the zope site for "manage_copyObjects" givs me two largely irrelevant hits. Looking at this for example: http://docs.neuroinf.de/api/plone-api/public/OFS.CopySupport.CopyContainer-class.html ( which is one of the first things google throws up ) gives no indication that REQUEST is a keyword parameter. G. ___ 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 best to copy and paste in pythonscript?
--On 28. August 2006 12:08:16 +0200 Gaute Amundsen <[EMAIL PROTECTED]> wrote: Hi. I am having some strange problems getting copy and paste to work propperly in python script Basically I do: parent.manage_copyObjects([currFold.id], REQUEST) in one script, and: dest_fold.manage_pasteObjects(REQUEST) You must check the APIs carefully. manage_pasteObjects() takes REQUEST as keyword parameter but not as positional parameter. So you must pass is it as keyword parameter! -aj pgpzoqDfNAIj9.pgp Description: 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] How best to copy and paste in pythonscript?
--On 28. August 2006 12:08:16 +0200 Gaute Amundsen <[EMAIL PROTECTED]> wrote: Hi. I am having some strange problems getting copy and paste to work propperly in python script Basically I do: parent.manage_copyObjects([currFold.id], REQUEST) in one script, and: dest_fold.manage_pasteObjects(REQUEST) in another I have tried a lot of variations, and read all that I could goolge about it, but stil it won't work. "still won't work" means what? Please provide a reasonable error description. -aj pgpTHVtQE3YTC.pgp Description: 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 )