[Zope] Re: OOP and Zope.

Josef Meile jmeile at hotmail.com
Fri Aug 26 18:57:41 EDT 2005


> I bought the book... But while it don't arrive, let me ask a last question... 
> 
> Is there a tutorial which allows me to work with pages in the .py
> format? Then, I could only use python to generate the content... :D
> I've seen a lot of pages in this format... Does Zope works with it?
If you mean to embedded html in python, it is possible, but not elegant. 
That's why there is zpt and dtml; to separate content from logic. 
However, there are some cases you may need to do it.

Anyway, if you still want to do it, then you can do something like:

def myPage():
   """Generates html"""
   html = """ \
   <html>
     <body>
       This is a test
     </body>
   </html>
   """
   return html

Regards,
Josef



More information about the Zope mailing list