[Zope] Automatically import a zexp

Stephan Richter srichter@cbu.edu
Tue, 22 Jan 2002 11:51:26 -0600


>>
>>as a Debian maintainer I wonder if there is any clean method to import
>>zexp products by a script (not using the import method from a browser).
>>The idea is that installing Python products is simple by copying the
>>python code to the right place and restart zope.  Works fine in the
>>Debian postinst script.
>>But what to do with zexp products.  I tried a very dirty hack like
>>
>>ZOPEUSER="<place the name of Zope administrator here>"
>>PASSWD="<and his password>"
>>## For sure this is insecure.
>>## You should find a secure way using debconf to maintain this!!!!
>>IMPORT=<product-name>.zexp
>>LC_ALL=en_EN
>>HOST=localhost
>>PORT=9673
>>wget --proxy=off --http-user=${ZOPEUSER} --http-pass=${PASSWD} \
>> 
>>http://${HOST}:${PORT}/Control_Panel/Products/${prod}/manage_importObject?file=${IMPORT}

The best way would be to write a Python script that makes the necessary API 
calls. Note that there is already code for that, sinc eyou can install ZEXP 
products directly from a Product.

BTW, the easiest way would be to create a distribution of your Zope ZClass 
product. All you need to do is to drop it in the Products directory and it 
will be added in the ZODB Products Folder.

Regards,
Stephan

--
Stephan Richter
CBU - Physics and Chemistry Student
Web2k - Web Design/Development & Technical Project Management