Get from .py view

If I have a (Browserview) file:

How can I import / use the content of a (containing Chameleon syntax ${context/something} etc.

(Usecase, I want to save a zip containg 'html pages', 'images', 'pdf', and an xml file for a folderish content item)

Take a look at the (old) code of collective.zipfiletransport.

Specially the method action_export in the class zipexport.ExportForm using the methods of collective.zipfiletransport.utilities.interfaces.ZipFileTransportUtility.

The package collective.zipfiletransport is old but some of its code might help get your use case working.

Uncertain if I understand this correctly:

I have a
If I register this as a (browser) view, I can get this from my (other) .py view.

From (other), I can then make a pdf (maybe with pdfkit.from_url('url_of_browser_view','out.pdf') and then use the same (or another view) to find the images etc used ( soup.find_all('img' )

But: do I really have to 'call it as a view', would it not be better to just 'use the from the py file?' (they would both be in the same add-on)?

I'm afraid I don't understand your example unless you explain more details.