[Zope3-Users] Create and Delete object from command line.
Chris Leonello
cleonello at yahoo.com
Fri Oct 7 12:41:26 EDT 2005
--- Nicolas Legault <nicolasl at immocontrole.ca> wrote:
> I need to create object in Zope3 like clicking in the Add section and
> filling the "Add form" via a python script that will be called from the
> command line. This script will add many or remove instance of different
> object in Zope3
>
> Up to day I've not come to understand a way to do this.
>
> Is there any information about a way to do this ?
You can mount the ZODB and work with it from python just
like any other python code. If this is a running server
it's probably very unwise to use this approach, however.
You could also use python's urllib and urllib2 modules
to to send a completed addform to the server from your python
code. urllib2 supports authentication, get/post form
variables, etc. Check out the python docs. There are a
couple of basic examples for urllib.
>
> Nicolas Legault
> Immo-Controle Inc.
> 514-272-3453 Ext 2
>
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
>
Chris Leonello
cleonello at yahoo.com
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
More information about the Zope3-users
mailing list