[Zope] How best to copy and paste in pythonscript?

Gaute Amundsen gaute at div.org
Mon Aug 28 07:00:59 EDT 2006


On Monday 28 August 2006 12:21, Andreas Jung wrote:
> --On 28. August 2006 12:08:16 +0200 Gaute Amundsen <gaute at div.org> 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.


More information about the Zope mailing list