[Zope] including arbitrary files in zope products

Raja Subramanian rsubr at pcomm.hfi.unimelb.edu.au
Fri Sep 3 02:33:15 EDT 2004


Hi,
    
I am facing a basic problem with Zope that I'm unable to solve.

I want to embed a java applet (jar) in my zope product.  The
jar file lives as "<Product Basedir>/www/foo.jar" on the filesystem.
I want to make this available as "<Product Instance Dir>/foo.jar"
inside zope.

To include ZPT files, I'm able to do -

    from Products.PageTemplates.PageTemplateFile import PageTemplateFile
    ...
    class Foo(Folder):
        ...
        index_html = PageTemplateFile('zpt/index_html', globals())

and make zpt files available inside zope.  How can I do the same for
arbitrary files such as java archives and others?

I don't know how to use the "File" object for this purpose.  Can
someone please help?

Thanks in advance.

- Raja



More information about the Zope mailing list