On Tue, 10 Oct 2006 15:00:08 GMT, John Salerno <[EMAIL PROTECTED]> wrote: >Fredrik Lundh wrote: > >> you don't even need anything from the standard library to inserting output >> from one function into given text... >> >> text = "... my page with %(foo)s markers ..." >> >> print text % dict(foo=function()) > >Wow, thanks. So if I have a file called header.html that contains all my >header markup, I could just insert this line into my html file? (which I >suppose would become a py file) > >print open('header.html').read() > >Not quite as elegant as include('header.html'), but it seems like it >would work.
def include(filename): print open(filename).read() include('header.html') Behold, the power of a general purpose programming language. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list