[Zope] Scripting ExternalFile

J Cameron Cooper jccooper at jcameroncooper.com
Thu Aug 28 19:55:42 EDT 2003


> I've got a script that generates HTML content on a regular basis, and 
> I want to be able to make it visible via Zope.  The ExternalFile 
> product is just about perfect, except that I want to be able to script 
> the "inclusion" of files into the Zope infrastructure rather than go 
> ExternalFile's GUI each time.
>
> I can't just leave the HTML content out in the file system; I need to 
> be able to manage access using Zope's security system.
>
> Has anyone got any pointers on how to do this, or even point me in the 
> right direction?

Dieter already told you how to find the appropriate methods. Depending 
on how you do your generating, you can call them from your script by any 
of several methods.

1) HTTP request. Just like a web browser, but automated. Fabricate a 
request and send it. Python's 'urllib2' will do nicely, as may curl or 
wget. Most other languages have similar facilities.
2) The 'Zope.App' method. Search the lists.
3) XML-RPC, which you can get at in most languages.

Probably other ways (ZEO, anybody?), but these are most obvious to me.

You may also want to look at LocalFS, which may be the easiest way of 
doing it, provided you can live with the names in Zope being the same as 
on the FS.

          --jcc




More information about the Zope mailing list